Issue with @payloadcms/richtext-lexical
package API:convertLexicalNodesToHTML
function is not exported publicly
#13692
Closed
onvlt
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
I just discovered that there's heading({ node, nodesToHTML }) {
const content = nodesToHTML({
converters: defaultConverters,
nodes: node.children,
parent: node,
}).join("");
return `<${node.tag}>${content}</${node.tag}>`;
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There's function
convertLexicalNodesToHTML
in@payloadcms/richtext-lexical/html
which is used internally by built-in HTML converters, but it is not exported from the package to be used by developers. However, this function is essential for building custom converters. For example, there's no way to convert node children inside converter to HTML:Only alternative is to use
convertLexicalNodesToHTML
from legacy API which is exported, but it deprecated.Same applies to its
async
counterpartconvertLexicalNodesToHTMLAsync
.Beta Was this translation helpful? Give feedback.
All reactions