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

textSerializers in getText don't override renderText set in schema #3670

Closed
1 of 2 tasks
harrisonlo opened this issue Jan 30, 2023 · 0 comments · Fixed by #3672
Closed
1 of 2 tasks

textSerializers in getText don't override renderText set in schema #3670

harrisonlo opened this issue Jan 30, 2023 · 0 comments · Fixed by #3672
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@harrisonlo
Copy link
Contributor

harrisonlo commented Jan 30, 2023

What’s the bug you are facing?

Similar to #3538, the getText utility needs to have these 2 lines updated:

return getText(this.state.doc, {
    blockSeparator,
    textSerializers: {
      ...getTextSerializersFromSchema(this.schema),
      ...textSerializers
    }
})

Which browser was this experienced in? Are any special extensions installed?

Chrome, no special extensions.

How can we reproduce the bug on our side?

Using the example in #3538, simply replace the generateText usage with editor.getText().

Can you provide a CodeSandbox?

No response

What did you expect to happen?

The textSerializers provided to getText() would override the renderText function defined in the schema.

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant