Place function inside editor module rather than the editorhelper code