Skip to main content

@lexical/code-core

Functions​

$plainifyCodeContent()​

$plainifyCodeContent(text): LexicalNode[]

Defined in: packages/lexical-code-core/src/FlatStructureUtils.ts:238

Plain split of code text into CodeHighlightNodes (with no highlight type) + LineBreakNodes + TabNodes. Used when the tokenizer opts out of a default language so a previously highlighted block still renders its \n / \t as real line breaks / tabs, while staying compatible with the indent / shift-lines handlers that only accept CodeHighlightNode + TabNode + LineBreakNode inside a CodeNode.

Parameters​

text​

string

Returns​

LexicalNode[]

References​

$createCodeHighlightNode​

Re-exports $createCodeHighlightNode


$createCodeNode​

Re-exports $createCodeNode


$getCodeLineDirection​

Re-exports $getCodeLineDirection


$getEndOfCodeInLine​

Re-exports $getEndOfCodeInLine


$getFirstCodeNodeOfLine​

Re-exports $getFirstCodeNodeOfLine


$getLastCodeNodeOfLine​

Re-exports $getLastCodeNodeOfLine


$getStartOfCodeInLine​

Re-exports $getStartOfCodeInLine


$isCodeHighlightNode​

Re-exports $isCodeHighlightNode


$isCodeNode​

Re-exports $isCodeNode


$outdentLeadingSpaces​

Re-exports $outdentLeadingSpaces


CodeExtension​

Re-exports CodeExtension


CodeHighlightNode​

Re-exports CodeHighlightNode


CodeIndentConfig​

Re-exports CodeIndentConfig


CodeIndentExtension​

Re-exports CodeIndentExtension


CodeNode​

Re-exports CodeNode


DEFAULT_CODE_LANGUAGE​

Re-exports DEFAULT_CODE_LANGUAGE


SerializedCodeNode​

Re-exports SerializedCodeNode