Slash menu shows Ctrl+Alt+C (Mod-Alt-c) for "Code Block", but the shortcut is not registered
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- developer-experience, frontend
Línea de trabajo
Empieza con packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts y compara la insignia del atajo de Code Block con el manejador de Quote en packages/core/src/blocks/Quote/block.ts. Después, inspecciona CodeKeyboardShortcutsExtension del bloque de código y sus pruebas existentes para encontrar el registro del atajo pertinente y su cobertura. Se considera terminado cuando Ctrl+Alt+C convierte contenido en línea en un bloque de código o el menú de barra ya no anuncia ese atajo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What's broken?
The "Code Block" item of the default slash menu displays the Mod-Alt-c keyboard shortcut (Ctrl+Alt+C, or ⌘+Alt+C on macOS) as its badge, but pressing it does nothing: no block spec registers this shortcut.
The badge is set in getDefaultSlashMenuItems.ts. The other badges in the same menu have a matching handler, e.g. Mod-Alt-q in Quote/block.ts, Mod-Alt-0 in the paragraph block and Mod-Alt-<level> in the heading block. The code block's CodeKeyboardShortcutsExtension only handles Delete, Tab, Enter and Shift-Enter, plus the ``` input rule.
What did you expect to happen?
Pressing Ctrl+Alt+C (⌘+Alt+C on macOS) in a block with inline content turns it into a code block, like Ctrl+Alt+Q turns it into a quote. Alternatively, if the shortcut is not meant to exist, the slash menu should not display it.
Steps to reproduce
- Open the minimal example: https://www.blocknotejs.org/examples/basic/minimal
- Type
/codeand notice the "CTRL-ALT-C" shortcut displayed next to "Code Block". - Press Escape, type some text in the paragraph and press Ctrl+Alt+C (⌘+Alt+C on macOS).
- The paragraph is not turned into a code block. Ctrl+Alt+Q, by comparison, does turn it into a quote.
BlockNote version
0.55.0 and 0.56.0 (still the case on main at 8e0485c)
Environment
Chromium on Linux, React 19 (not environment specific: the handler is missing from the code)
Additional context
We work around it in XWiki by adding a Mod-Alt-c keyboard shortcut extension to the code block spec, modelled on the quote block's shortcut.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.3k
- Forks
- 780
- Merge medio
- 3 d 11 h
- PR fusionados (30 d)
- 44
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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.
Más de TypeCellOS/BlockNote
-
Markdown export breaks bold, italic and strikethrough when the styled text starts with a spacePosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
TypeCellOS/BlockNote#3232 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TypeCellOS/BlockNote#2949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
TypeCellOS/BlockNote#2855 ·
Los mantenedores suelen responder en 1 día
-
a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TypeCellOS/BlockNote#2829 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaPosiblemente ocupada @matthewlipski la tomó hoy. Abiertoa11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TypeCellOS/BlockNote#2824 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de TypeCellOS/BlockNote
Issues similares
-
createAI: the ai peer range allows ai@6, which the provider cannot work withPosiblemente ocupada @akhil9tiet la tomó hoy. Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
cloudflare/agents#2690 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[fullsend] E2E: theme — global-header ignores app.branding.fullLogo (RHDHBUGS-3670)Posiblemente ocupada @fullsend-ai-coder la tomó hoy. Abiertoe2e-failure ready-to-code
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
redhat-developer/rhdh-plugin-export-overlays#4503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs triage 📥
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
ethereum/ethereum-org-website#19601 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Circular app layout navigation and help icons are shifted upward in the official demoAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
cloudscape-design/components#5184 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
agilepathway/label-checker#805 ·
Los mantenedores suelen responder en 1 día