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

More than one heading throws error on copy-paste #1238

Closed
nokola opened this issue Sep 15, 2021 · 0 comments · Fixed by #1629
Closed

More than one heading throws error on copy-paste #1238

nokola opened this issue Sep 15, 2021 · 0 comments · Fixed by #1629
Labels
type: bug 🪲 Something isn't working

Comments

@nokola
Copy link

nokola commented Sep 15, 2021

Summary

Copy-pasting multiple # headings throws error.

Steps to reproduce

  1. Open https://remirror.io/
  2. Type aaabbb in editor and position cursor between the aaa and bbb:
    image
  3. Copy-paste this text from somewhere:
# hello
# world

Expected results

aaa and bbb are separated by two lines that each say "hello" and "world" in heading 1 style.
image

Actual results

Error in developer console and this as editor:
image

5060.3acc2677.js:2 Uncaught Error: Called contentMatchAt on a node with invalid content
    at R.contentMatchAt (5060.3acc2677.js:2)
    at _.placeNodes (5060.3acc2677.js:2)
    at _.fit (5060.3acc2677.js:2)
    at 5060.3acc2677.js:2
    at e.u.replace (5060.3acc2677.js:2)
    at e.u.replaceRange (5060.3acc2677.js:2)
    at e.s.replace (5060.3acc2677.js:2)
    at e.replace (5060.3acc2677.js:2)
    at e.replaceSelection (5060.3acc2677.js:2)
    at xe (5060.3acc2677.js:2)

Possible Solution

Looks like issue with prosemirror-paste-rules not being able to paste more than one block node inside inline content.

Screenshot(s)

issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant