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

Custom topNode that uses addExtensions to include defaultExtensions throws error #1309

Closed
tobiasfuhlroth opened this issue May 12, 2021 · 0 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@tobiasfuhlroth
Copy link

Description
When using addExtensions on a custom topNode to include mandatory extensions (like Text), tiptap throws an Error saying: RangeError: Schema is missing its top node type ('doc')

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Go to the CodeSandbox
  2. Reload App
  3. See error message

CodeSandbox
I created a CodeSandbox to help you debug the issue:
https://codesandbox.io/s/tiptap-issue-template-forked-k5xxp?file=/src/components/Tiptap.vue

Expected behavior
I should just work 😄

Additional context
If you remove addExtensions from Letter and add Paragraph and Text in the editors extensions directly it works.

@tobiasfuhlroth tobiasfuhlroth added Type: Bug The issue or pullrequest is related to a bug v2 labels May 12, 2021
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

No branches or pull requests

1 participant