polish: modify layout, improve inserted template when re-editing