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

[Bug]: Inserting new block using insertContent function at paragraph start will create empty paragraph above #5943

Open
1 task done
volarname opened this issue Dec 17, 2024 · 0 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@volarname
Copy link
Contributor

Affected Packages

core

Version(s)

2.10.3

Bug Description

Steps to reproduce

  1. Open https://codesandbox.io/p/devbox/jovial-waterfall-z9nvpx
  2. Place cursor at paragraph start
  3. use button to insert block node (using tiptap insertContent function)
  4. check printed json output or visually check the spacing of created block
  5. it will create unwanted empty paragraph above

Browser Used

Chrome

Code Example URL

https://codesandbox.io/p/devbox/jovial-waterfall-z9nvpx

Expected Behavior

it should insert new node without creating additional empy paragraph

Additional Context (Optional)

when you now position at the end of paragraph and insert the block node using insertContent function it will do it correctly, it will just insert it after current paragraph, no empty paragraph will appear after, so it should do it same on paragraph start.

Dependency Updates

  • Yes, I've updated all my dependencies.
@volarname volarname added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

1 participant