Skip to main content

Module: @lexical/markdown

Type Aliases

ElementTransformer

Ƭ ElementTransformer: Object

Type declaration

NameType
export(node: LexicalNode, traverseChildren: (node: ElementNode) => string) => string | null
regExpRegExp
replace(parentNode: ElementNode, children: LexicalNode[], match: string[], isImport: boolean) => void
type"element"

Defined in

lexical-markdown/src/MarkdownTransformers.ts:34


TextFormatTransformer

Ƭ TextFormatTransformer: Readonly<{ format: ReadonlyArray<TextFormatType> ; intraword?: boolean ; tag: string ; type: "text-format" }>

Defined in

lexical-markdown/src/MarkdownTransformers.ts:50


TextMatchTransformer

Ƭ TextMatchTransformer: Readonly<{ 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:57


Transformer

Ƭ Transformer: ElementTransformer | TextFormatTransformer | TextMatchTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:29

Variables

BOLD_ITALIC_STAR

Const BOLD_ITALIC_STAR: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:252


BOLD_ITALIC_UNDERSCORE

Const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:258


BOLD_STAR

Const BOLD_STAR: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:265


BOLD_UNDERSCORE

Const BOLD_UNDERSCORE: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:271


CHECK_LIST

Const CHECK_LIST: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:228


CODE

Const CODE: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:198


ELEMENT_TRANSFORMERS

Const ELEMENT_TRANSFORMERS: ElementTransformer[]

Defined in

lexical-markdown/src/index.ts:38


HEADING

Const HEADING: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:146


INLINE_CODE

Const INLINE_CODE: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:246


ITALIC_STAR

Const ITALIC_STAR: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:284


ITALIC_UNDERSCORE

Const ITALIC_UNDERSCORE: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:290


Const LINK: TextMatchTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:301


ORDERED_LIST

Const ORDERED_LIST: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:237


QUOTE

Const QUOTE: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:162


STRIKETHROUGH

Const STRIKETHROUGH: TextFormatTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:278


TEXT_FORMAT_TRANSFORMERS

Const TEXT_FORMAT_TRANSFORMERS: TextFormatTransformer[]

Defined in

lexical-markdown/src/index.ts:50


TEXT_MATCH_TRANSFORMERS

Const TEXT_MATCH_TRANSFORMERS: TextMatchTransformer[]

Defined in

lexical-markdown/src/index.ts:61


TRANSFORMERS

Const TRANSFORMERS: Transformer[]

Defined in

lexical-markdown/src/index.ts:63


UNORDERED_LIST

Const UNORDERED_LIST: ElementTransformer

Defined in

lexical-markdown/src/MarkdownTransformers.ts:219

Functions

$convertFromMarkdownString

$convertFromMarkdownString(markdown, transformers?): void

Parameters

NameTypeDefault value
markdownstringundefined
transformersTransformer[]TRANSFORMERS

Returns

void

Defined in

lexical-markdown/src/index.ts:69


$convertToMarkdownString

$convertToMarkdownString(transformers?): string

Parameters

NameTypeDefault value
transformersTransformer[]TRANSFORMERS

Returns

string

Defined in

lexical-markdown/src/index.ts:77


registerMarkdownShortcuts

registerMarkdownShortcuts(editor, transformers?): () => void

Parameters

NameTypeDefault value
editorLexicalEditorundefined
transformersTransformer[]TRANSFORMERS

Returns

fn

▸ (): void

Returns

void

Defined in

lexical-markdown/src/MarkdownShortcuts.ts:322