Interface: CodeBlockEditorContextValue

A set of functions that modify the underlying code block node. Access this with the useCodeBlockEditorContext hook in your custom code editor components.


lexicalNodeCodeBlockNodeThe Lexical node that's being edited.
parentEditorLexicalEditorThe parent Lexical editor.
setCode(code: string) => voidUpdates the code contents of the code block.
setLanguage(language: string) => voidUpdates the language of the code block. See for language examples.
setMeta(meta: string) => voidUpdates the meta of the code block. The meta is the additional string that comes after the code block language.