UNPKG

@mkljczk/lexical-remark

Version:

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

13 lines (12 loc) 345 B
export const link = (node, { rootHandler }) => { const remarkNode = { children: node .getChildren() .map((child) => rootHandler(child, { rootHandler })) .filter((child) => !!child), title: node.getTitle(), type: 'link', url: node.getURL(), }; return remarkNode; };