CodeBlockEditorContextValue interface
A set of functions that modify the underlying code block node. Get this with the useCodeBlockEditorContext() hook.
Signature:
export interface CodeBlockEditorContextValue
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
lexicalNode | CodeBlockNode | The Lexical node that's being edited. | |
setCode | (code: string) => void | Updates the code contents of the code block. | |
setLanguage | (language: string) => void | Updates the language of the code block. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting for language examples. | |
setMeta | (meta: string) => void | Updates the meta of the code block. The meta is the additional string that comes after the code block language. |