small refeactoring on getEditorTemplate