Lexical tool operations from @datalayer/jupyter-lexical
Unique identifier for the lexical document
DefaultExecutor instance for executing operations (LexicalDefaultExecutor)
WebviewRunner configured with lexical operations
import { lexicalToolOperations, DefaultExecutor } from "@datalayer/jupyter-lexical";
import { useLexicalStore } from "@datalayer/jupyter-lexical";
const lexicalState = useLexicalStore();
const executor = new DefaultExecutor(lexicalId, lexicalState);
const runner = createLexicalRunner(lexicalToolOperations, lexicalId, executor);
const result = await runner.execute("insertBlock", {
blockType: "code",
source: "print('hello')"
});
Creates a Runner instance for lexical webview with all lexical operations.