TypeCellOS / TypeCellOS/BlockNote

Caret moves before text inserted with a custom React style

Ouverte
#3,064 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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

  1. Clone the reproduction and run vp install, then vp run dev.
  2. Click Insert styled text.
  3. Type continued without 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

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. 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

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.