openNotebookDocumentAsync

Open a notebook. Will return early if this notebook is already loaded. Otherwise the notebook is loaded and the {@linkcode onDidOpenNotebookDocument}-event fires.

Note that the lifecycle of the returned notebook is owned by the editor and not by the extension. That means an {@linkcode onDidCloseNotebookDocument}-event can occur at any time after.

Note that opening a notebook does not show a notebook editor. This function only returns a notebook document which can be shown in a notebook editor but it can also be used for other things.

Parameters

uri

The resource to open.


fun openNotebookDocumentAsync(notebookType: String, content: NotebookData = definedExternally): PromiseLike<NotebookDocument>(source)

Open an untitled notebook. The editor will prompt the user for a file path when the document is to be saved.

Parameters

notebookType

The notebook type that should be used.

content

The initial contents of the notebook.

See also

workspace.openNotebookDocument