Datalayer VS Code Extension - v0.0.9
    Preparing search index...
    • Creates a Runner instance for lexical webview with all lexical operations.

      Parameters

      • lexicalToolOperations: any

        Lexical tool operations from @datalayer/jupyter-lexical

      • lexicalId: string

        Unique identifier for the lexical document

      • executor: any

        DefaultExecutor instance for executing operations (LexicalDefaultExecutor)

      Returns WebviewRunner

      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')"
      });