We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We want to replace everything in the editor with spaces. Therefore, we use the parseOptions parameter for configuration.
But it didn't work.
this.editor .chain() .setContent(newContent, false, { parseOptions: { preserveWhitespace: "full", }, }) .focus(focusPosition) .run();
Execute the above code, the content of the editor is replaced, but there are no white space characters.
No response
As the document says, it can keep all spaces in the new content.
It is normal for me to use the code below, but it is an insert, not a replacement.
this.editor .chain() .insertContent(newContent, { parseOptions: { preserveWhitespace: "full", }, }) .focus() .run();
The text was updated successfully, but these errors were encountered:
Right now, parseOptions is the third parameter of the setContent command. So this should work:
setContent
this.editor .chain() .setContent(newContent, false, { preserveWhitespace: "full", }) .focus(focusPosition) .run();
This may change in the future if we refactor some commands as part of #2087
Sorry, something went wrong.
No branches or pull requests
What’s the bug you are facing?
We want to replace everything in the editor with spaces. Therefore, we use the parseOptions parameter for configuration.
But it didn't work.
How can we reproduce the bug on our side?
Execute the above code, the content of the editor is replaced, but there are no white space characters.
Can you provide a CodeSandbox?
No response
What did you expect to happen?
As the document says, it can keep all spaces in the new content.
Anything to add? (optional)
It is normal for me to use the code below, but it is an insert, not a replacement.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: