Implementing a custom file editor


I’d like to add a non-text based editor to Atom for certain file types. Is there a way to capture the file->open intent?

I looked at the CommandRegistry docs, but can’t find any list of the commands that are available to listen to.



I think you want atom.workspace::addOpener().


Check out html-tab for a tiny example package to use openers and arbitrary html in a tab.



Does the object returned from the closure passed to addOpener() just need to implement dispose(), or must it have Disposable in the prototype chain?


Thanks. I might go this route too, since I want to edit HTML and share a TextBuffer with any other TextEditors open on the same file.


All that is needed to implement Dispose is to have a dispose() method.