Module: @lexical/markdown
Type Aliases
ElementTransformer
Ƭ ElementTransformer: Object
Type declaration
Name | Type |
---|---|
dependencies | Klass <LexicalNode >[] |
export | (node : LexicalNode , traverseChildren : (node : ElementNode ) => string ) => string | null |
regExp | RegExp |
replace | (parentNode : ElementNode , children : LexicalNode [], match : string [], isImport : boolean ) => void |
type | "element" |
Defined in
lexical-markdown/src/MarkdownTransformers.ts:46
TextFormatTransformer
Ƭ TextFormatTransformer: Readonly
<{ format
: ReadonlyArray
<TextFormatType
> ; intraword?
: boolean
; tag
: string
; type
: "text-format"
}>
Defined in
lexical-markdown/src/MarkdownTransformers.ts:63
TextMatchTransformer
Ƭ TextMatchTransformer: Readonly
<{ dependencies
: Klass
<LexicalNode
>[] ; export
: (node
: LexicalNode
, exportChildren
: (node
: ElementNode
) => string
, exportFormat
: (node
: TextNode
, textContent
: string
) => string
) => string
| null
; importRegExp
: RegExp
; regExp
: RegExp
; replace
: (node
: TextNode
, match
: RegExpMatchArray
) => void
; trigger
: string
; type
: "text-match"
}>
Defined in
lexical-markdown/src/MarkdownTransformers.ts:70
Transformer
Ƭ Transformer: ElementTransformer
| TextFormatTransformer
| TextMatchTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:41
Variables
BOLD_ITALIC_STAR
• Const
BOLD_ITALIC_STAR: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:278
BOLD_ITALIC_UNDERSCORE
• Const
BOLD_ITALIC_UNDERSCORE: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:284
BOLD_STAR
• Const
BOLD_STAR: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:291
BOLD_UNDERSCORE
• Const
BOLD_UNDERSCORE: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:297
CHECK_LIST
• Const
CHECK_LIST: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:246
CODE
• Const
CODE: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:214
ELEMENT_TRANSFORMERS
• Const
ELEMENT_TRANSFORMERS: ElementTransformer
[]
Defined in
lexical-markdown/src/index.ts:40
HEADING
• Const
HEADING: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:160
HIGHLIGHT
• Const
HIGHLIGHT: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:272
INLINE_CODE
• Const
INLINE_CODE: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:266
ITALIC_STAR
• Const
ITALIC_STAR: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:310
ITALIC_UNDERSCORE
• Const
ITALIC_UNDERSCORE: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:316
LINK
• Const
LINK: TextMatchTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:327
ORDERED_LIST
• Const
ORDERED_LIST: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:256
QUOTE
• Const
QUOTE: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:177
STRIKETHROUGH
• Const
STRIKETHROUGH: TextFormatTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:304
TEXT_FORMAT_TRANSFORMERS
• Const
TEXT_FORMAT_TRANSFORMERS: TextFormatTransformer
[]
Defined in
lexical-markdown/src/index.ts:52
TEXT_MATCH_TRANSFORMERS
• Const
TEXT_MATCH_TRANSFORMERS: TextMatchTransformer
[]
Defined in
lexical-markdown/src/index.ts:64
TRANSFORMERS
• Const
TRANSFORMERS: Transformer
[]
Defined in
lexical-markdown/src/index.ts:66
UNORDERED_LIST
• Const
UNORDERED_LIST: ElementTransformer
Defined in
lexical-markdown/src/MarkdownTransformers.ts:236
Functions
$convertFromMarkdownString
▸ $convertFromMarkdownString(markdown
, transformers?
, node?
): void
Parameters
Name | Type | Default value |
---|---|---|
markdown | string | undefined |
transformers | Transformer [] | TRANSFORMERS |
node? | ElementNode | undefined |
Returns
void
Defined in
lexical-markdown/src/index.ts:72
$convertToMarkdownString
▸ $convertToMarkdownString(transformers?
, node?
): string
Parameters
Name | Type | Default value |
---|---|---|
transformers | Transformer [] | TRANSFORMERS |
node? | ElementNode | undefined |
Returns
string
Defined in
lexical-markdown/src/index.ts:81
registerMarkdownShortcuts
▸ registerMarkdownShortcuts(editor
, transformers?
): () => void
Parameters
Name | Type | Default value |
---|---|---|
editor | LexicalEditor | undefined |
transformers | Transformer [] | TRANSFORMERS |
Returns
fn
▸ (): void
Returns
void
Defined in
lexical-markdown/src/MarkdownShortcuts.ts:323