UNPKG

@mkljczk/lexical-remark

Version:

This package contains Markdown helpers and functionality for Lexical using remark-parse.

11 lines (10 loc) 285 B
export const root = (node, { rootHandler }) => { const remarkNode = { children: node .getChildren() .map((child) => rootHandler(child, { rootHandler })) .filter((child) => !!child), type: 'root', }; return remarkNode; };