TypeCellOS / TypeCellOS/BlockNote
Caret moves before text inserted with a custom React style
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.2k
- Forks
- 772
- Merge medio
- 3 d 11 h
- PR fusionados (30 d)
- 17
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 68/100