TypeCellOS / TypeCellOS/BlockNote
Caret moves before text inserted with a custom React style
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 772
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 17
Description
What’s broken?
After inserting text with a custom React style using editor.insertInlineContent(), typing inserts text before the inserted text instead of after it.
What did you expect to happen?
The caret should remain after the inserted text. Typing continued after inserting Styled text should produce Styled text continued, but instead produces continuedStyled text.
Steps to reproduce
Minimal reproduction: https://github.com/ntietje1/blocknote-react-mark-caret-repro
- Clone the reproduction and run
vp install, thenvp run dev. - Click Insert styled text.
- Type
continuedwithout clicking the editor again.
BlockNote version
@blocknote/core and @blocknote/react 0.54.0.
Environment
Windows, Chromium, React 19.1.1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction and trace the editor.insertInlineContent() entry point when the custom React style is inserted. Verify caret placement by following the reproduction steps; done means typing continued produces Styled text continued without clicking the editor again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100