Create Blank Pane


Hello, there!

I am creating a package for specialized drawing inside the editor and need to create a Pane for the drawing to take place. I tried a Panel, but they don’t seem to support horizontal resizing.
So far I could only “create a Pane” by calling, what made me assume Panes are necessarily TextEditors.

Then my question: is there a way to create Blank Panes for me to insert any HTML and keep the ability to scroll horizontally?

Relevant code, so far:, {
  split: 'right'
  // Destroy the editor stuff making the Pane empty.
  // Apply my view to the Pane.
  // Celebrate Victory!

Thanks in advance.


If you take a look at the documentation for, it specifically states “or no registered opener can open the URI” then it resorts to opening a blank TextEditor. You can find out more about registering an opener for a URI under the documentation for atom.workspace.addOpener. This is also a technique employed by the markdown-preview package.


Helped very much, thanks!

In a related matter, I couldn’t find a straightforward way for getting the Pane which contains a given TextEditor, any suggestions?


If you look at the Extended methods in the Panes section of the Workspace class, you’ll find the paneForURI function.


I did already try it but with no positive results. On the following block:, {split: 'right'}).then(function(){

The p contains a valid (now open) path. The third line logs undefined.


I’m not sure that the promise returned by does everything you’re expecting it to by the code snippet you’re showing. The URI might be open … but that doesn’t mean that the pane is instantiated and everything is in place visually.