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

InsertBlocks does nothing #1408

Closed
hacknplan opened this issue Feb 2, 2025 · 1 comment · Fixed by #1436
Closed

InsertBlocks does nothing #1408

hacknplan opened this issue Feb 2, 2025 · 1 comment · Fixed by #1436
Assignees
Labels
bug Something isn't working

Comments

@hacknplan
Copy link

hacknplan commented Feb 2, 2025

Describe the bug

The insertBlocks function doesn't seem to work. I'm trying to insert a line at the beginning of the document using the following code, as stated in the docs:

editor.insertBlocks(
    [{ type: "paragraph", content: content }],
    editor.document[0],
    "before"
);

If you go to the docs, the example doesn't work either, the "Insert First Block" button does nothing:
https://www.blocknotejs.org/examples/basic/block-manipulation

No error is thrown anywhere.

To Reproduce

Misc

  • BlockNote version: 0.23.1
  • React version: 19.0.0
  • Node version: 21.5.0
  • Package manager: NPM
  • Browser: Chrome 132.0.6834.160 (Windows 10)
@hacknplan hacknplan added the bug Something isn't working label Feb 2, 2025
@YousefED
Copy link
Collaborator

Thanks! Will be fixed in next release, or pass a type: "paragraph" to the block if you want to fix it before that

@YousefED YousefED self-assigned this Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants