CodeBlockEditorContextValue interface

A set of functions that modify the underlying code block node. Get this with the useCodeBlockEditorContext() hook.


export interface CodeBlockEditorContextValue 


lexicalNodeCodeBlockNodeThe Lexical node that's being edited.
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.