fix: suppression raccourcis clavier inutiles — slash menu uniquement
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:
@@ -163,16 +163,6 @@ export const CalloutExtension = Node.create({
|
||||
addNodeView() {
|
||||
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') {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -295,14 +295,7 @@ export const MathEquationExtension = Node.create({
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-Shift-M': () => this.editor.commands.insertContent({
|
||||
type: this.name,
|
||||
attrs: { latex: '' },
|
||||
}),
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -134,14 +134,6 @@ export const OutlineExtension = Node.create({
|
||||
addNodeView() {
|
||||
return ReactNodeViewRenderer(OutlineView)
|
||||
},
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-Alt-O': () => this.editor.commands.insertContent({
|
||||
type: this.name,
|
||||
}),
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
export function insertOutlineBlock(editor: any) {
|
||||
|
||||
@@ -130,16 +130,6 @@ export const ToggleExtension = Node.create({
|
||||
addNodeView() {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user