fix: suppression raccourcis clavier inutiles — slash menu uniquement
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m4s
CI / Deploy production (on server) (push) Has been skipped

Les blocs (toggle, callout, outline, columns, math) n'ont plus de
raccourcis clavier. Insertion via le menu / uniquement, comme Notion.
Plus de confusion pour l'utilisateur.
This commit is contained in:
Antigravity
2026-06-20 15:55:15 +00:00
parent ee70e74bf5
commit af3f130549
5 changed files with 1 additions and 49 deletions

View File

@@ -163,16 +163,6 @@ export const CalloutExtension = Node.create({
addNodeView() { addNodeView() {
return ReactNodeViewRenderer(CalloutView) return ReactNodeViewRenderer(CalloutView)
}, },
addKeyboardShortcuts() {
return {
'Mod-Alt-C': () => this.editor.commands.insertContent({
type: this.name,
attrs: { type: 'info' },
content: [{ type: 'paragraph' }],
}),
}
},
}) })
export function insertCalloutBlock(editor: any, type: CalloutType = 'info') { export function insertCalloutBlock(editor: any, type: CalloutType = 'info') {

View File

@@ -83,19 +83,6 @@ export const ColumnsExtension = Node.create({
}, },
} }
}, },
addKeyboardShortcuts() {
return {
'Mod-Alt-L': () => this.editor.commands.insertContent({
type: this.name,
attrs: { cols: 2 },
content: [
{ type: 'column', attrs: { index: 0 }, content: [{ type: 'paragraph' }] },
{ type: 'column', attrs: { index: 1 }, content: [{ type: 'paragraph' }] },
],
}),
}
},
}) })
function addOrDeleteCol(state: EditorState, dispatch?: (tr: Transaction) => void, type?: 'addBefore' | 'addAfter' | 'delete'): boolean { function addOrDeleteCol(state: EditorState, dispatch?: (tr: Transaction) => void, type?: 'addBefore' | 'addAfter' | 'delete'): boolean {

View File

@@ -295,14 +295,7 @@ export const MathEquationExtension = Node.create({
}, },
] ]
}, },
})
addKeyboardShortcuts() {
return {
'Mod-Shift-M': () => this.editor.commands.insertContent({
type: this.name,
attrs: { latex: '' },
}),
}
}, },
}) })

View File

@@ -134,14 +134,6 @@ export const OutlineExtension = Node.create({
addNodeView() { addNodeView() {
return ReactNodeViewRenderer(OutlineView) return ReactNodeViewRenderer(OutlineView)
}, },
addKeyboardShortcuts() {
return {
'Mod-Alt-O': () => this.editor.commands.insertContent({
type: this.name,
}),
}
},
}) })
export function insertOutlineBlock(editor: any) { export function insertOutlineBlock(editor: any) {

View File

@@ -130,16 +130,6 @@ export const ToggleExtension = Node.create({
addNodeView() { addNodeView() {
return ReactNodeViewRenderer(ToggleView) return ReactNodeViewRenderer(ToggleView)
}, },
addKeyboardShortcuts() {
return {
'Mod-Shift-T': () => this.editor.commands.insertContent({
type: this.name,
attrs: { opened: true },
content: [{ type: 'paragraph' }],
}),
}
},
}) })
export function insertToggleBlock(editor: any) { export function insertToggleBlock(editor: any) {