How to open a new preview tab with custom url

I know how to add commands to the context menu/command panel. But I don’t know how to open a new preview tab inside of Nova preferable

Edit: nova.openURL can open an url inside the browser, I’m asking how to preview the url inside the nova itself.

There is not currently an API for this, but it’s definitely a good suggestion. I will file this with our tracker.

3 Likes

Any news on this?

I’m trying to improve the Solargraph LSP and a feature that was missing is the ability to open the html pages generated by the LSP. I’ve been able to write the request responses in html files inside the nova.fs.tempdir but I’ve not been able to open them in Nova. nova.openURL with file://... opens the files in the browser but having them directly inside Nova would much better. I guess it could require not only an API for controlling the Preview but also the ability for the Preview to open links not directly inside the workspace (maybe just within the tempdir) or with the file protocol.

Thanks!

Not yet, sadly. This is still on our list of feature requests, but hasn’t been approached yet.

I am interested in this too. Possibly we can open a preview window for jupyter cell output using extension.

Please make this happen, I would add so much more power to extensions.

I would be happy I you add an API similar to “window.open()” but in addition give us access to its “document” and “window” objects.