Fixed email rendering of lexical posts

refs c489343831

- `lexicalLib.lexicalHtmlRenderer` can't be used directly because it's missing required config for nodes to render properly
- updated email serializers to use `lexicalLib.render()` instead
This commit is contained in:
Kevin Ansfield 2023-02-13 16:48:30 +00:00
parent c489343831
commit 6fe8154329
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class EmailServiceWrapper {
settingsHelpers,
renderers: {
mobiledoc: mobiledocLib.mobiledocHtmlRenderer,
lexical: lexicalLib.lexicalHtmlRenderer
lexical: lexicalLib
},
imageSize,
urlUtils,

View File

@ -303,7 +303,7 @@ const PostEmailSerializer = {
}
if (post.lexical) {
post.html = lexicalLib.lexicalHtmlRenderer.render(
post.html = lexicalLib.render(
post.lexical, {target: 'email', postUrl: post.url}
);
} else {