Notebook tool operations from @datalayer/jupyter-react
Unique identifier for the notebook document
DefaultExecutor instance for executing operations (NotebookDefaultExecutor)
WebviewRunner configured with notebook operations
import { notebookToolOperations, DefaultExecutor } from "@datalayer/jupyter-react";
import { useNotebookStore2 } from "@datalayer/jupyter-react";
const notebookStore = useNotebookStore2();
const executor = new DefaultExecutor(notebookId, notebookStore);
const runner = createNotebookRunner(notebookToolOperations, notebookId, executor);
const result = await runner.execute("insertCell", {
cellType: "code",
source: "print('hello')"
});
Creates a Runner instance for notebook webview with all notebook operations.