TypeCellOS / TypeCellOS/BlockNote

Caret moves before text inserted with a custom React style

Abierto
#3,064 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

  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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. 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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.