mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
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:
parent
c489343831
commit
6fe8154329
@ -58,7 +58,7 @@ class EmailServiceWrapper {
|
||||
settingsHelpers,
|
||||
renderers: {
|
||||
mobiledoc: mobiledocLib.mobiledocHtmlRenderer,
|
||||
lexical: lexicalLib.lexicalHtmlRenderer
|
||||
lexical: lexicalLib
|
||||
},
|
||||
imageSize,
|
||||
urlUtils,
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user