Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lexical.dev.js:9060 Uncaught Error: Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read(). #62

Open
lwelcom opened this issue Oct 18, 2023 · 2 comments

Comments

@lwelcom
Copy link

lwelcom commented Oct 18, 2023

Describe the bug
"verbum": "^0.5.0",

  1. Unable to initialize default value
  2. onChange cannot be converted into html code

const onChange = (state: string, editor?: any) => {
console.log(state, editor, "-----------------------editor");

editor?.update(() => {
const editorState = editor.getEditorState();
console.log(editorState, "-------------------------editorState");

const jsonString = JSON.stringify(editorState);
console.log(jsonString, '-------------------------jsonString');

const htmlString = $generateHtmlFromNodes(editor, null);
console.log(htmlString, '-------------------------htmlString');

})

@HoaPhamThi
Copy link

I have the same problem, please help me

@henryobiaraije
Copy link

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants