cannot render the text in SSR with nextjs? #2880
blackrabbit944
started this conversation in
General
Replies: 2 comments 1 reply
-
|
Check out @lexical/headless |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, I'm facing the same challenge. I've got a html string and I'm struggling on how can I map this string to the initialState that's injected on LexicalComposer. I suppose I need to make the parser but DOMParser is only available on client side. I've tried JSDOM but then I have some conflicts importing this library in a component that's used on client side. Have anyone succeed loading text in SSR? Thank you for your time. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a post website which i used the lexical for the rich text editor.
but i found when i trying to render the SSR website , the lexical cannot render the HTML before the javascript runing.
const initialConfig = { namespace: 'editor', theme, onError, readOnly, nodes : [...nodes] };const editorStateRef = useRef();if (initialEditorState) { initialConfig['editorState'] = initialEditorState; }here is some code of my website, but seems it need render the html with javascript runing in client. is there any way to use SSR with lexical ? thanks
Beta Was this translation helpful? Give feedback.
All reactions