TypeCellOS / TypeCellOS/BlockNote
Caret moves before text inserted with a custom React style
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 10.2k
- Forks
- 772
- Merge moyen
- 3 j 11 h
- PR mergées (30 j)
- 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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100