Get access to rename file editor

Hey guys,

Could you please clarify how to get an editor instance for which I can change the filename?

I need to hide file extension for user before editing a file and then add it back before editor will be closed.

Thanks

Found this snippet https://snippet.webix.com/lvq0u5d8 where editor can be accessed via onBeforeEditStop and onAfterEditStop. But both these events fire when user closes the editor. Found the onAfterEditStart event which will be fired when editor starts working but it didn’t work for me.

My attempt https://snippet.webix.com/bj72a0r4

Hello @Dennis,

You are correct as in you can definitely use the onAfterEditStart event to get the editor object. The issue in your sample is that you are trying to refer to the filemanager component while it doesn’t have such an event. The specified event will work if you try to attach the handler to the treetable/dataview part of the component: https://snippet.webix.com/7pam1kat.

A more convenient solution would probably look like this: https://snippet.webix.com/efskjhim. The onAfterEditFile is pretty much the equivalent of onAfterEditStart in this case (as it fires upon the same conditions), the only issue is that is doesn’t receive any arguments, if that’s an issue at all in your case of course.

thanks for the help @Dzmitry,

your suggestions work perfectly!