UNPKG

@mdxeditor/editor

Version:

React component for rich text markdown editing

11 lines (10 loc) 284 B
import { $isLineBreakNode } from "lexical"; const LexicalLinebreakVisitor = { testLexicalNode: $isLineBreakNode, visitLexicalNode: ({ mdastParent, actions }) => { actions.appendToParent(mdastParent, { type: "text", value: "\n" }); } }; export { LexicalLinebreakVisitor };