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

Cannot add property deleteBackward, object is not extensible when creating editor #13

Open
mikerhyssmith opened this issue Jun 1, 2022 · 2 comments

Comments

@mikerhyssmith
Copy link

Thanks for this library - feels like it could be the solution to so many problems ! I'm having trouble getting a minimal test setup with an editor.

When I create the editor using withHistory(withReact(mockEditor ?? createEditor()) I end up getting the error TypeError: Cannot add property deleteBackward, object is not extensible

Any idea what might be happening there ?

Versions:
React: 17.0.2
Slate: 0.78.0
Slate-React: 0.79.0

@mikerhyssmith
Copy link
Author

I'm not entirely clear on why this is the case but it looks like maybe this is something to do with React 17

Adding /** @jsxRuntime classic */ above /** @jsx jsx */ seemed to resolve this for me.

@mwood23 I'm not sure if this is worth adding to the comment around using with React 17 ? Happy to PR if it is !

@samjcombs
Copy link

Im having this same issue with similar versions, but the classic runtime setting isnt working for me...

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

2 participants