Create panel as child of text editor?


#1

I was wondering if it’s possible to create a new panel as a child of a text editor, from my understanding of the API documentation it doesn’t look like it, but maybe there are some tricks around this? Ideally, when switching tabs, the panel would go out of sight and when closing the tab, the panel would be destroyed as well. I guess, I could implement a logic that mimics that behaviour, but if there are easier ways to achieve this, I’m interested in hearing them.


#2

The easiest way is probably atom.workspace.observeActivePaneItem(). You can have that run some logic to figure out whether or not the panel should be shown for a given TextEditor.