import { generateHTML, parseHTML } from '@payloadcms/richtext-lexical';
// Convert Lexical JSON to HTML:
const html = await generateHTML(lexicalStateJSON, editorConfig);
// Convert HTML to Lexical JSON:
const lexicalJSON = await parseHTML(html, editorConfig);