add extension keymaps
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import { Mark } from '@tiptap/core'
|
||||
import { toggleMark } from 'prosemirror-commands'
|
||||
|
||||
declare module '@tiptap/core/src/Editor' {
|
||||
interface Editor {
|
||||
italic(): Editor,
|
||||
}
|
||||
}
|
||||
|
||||
export default class Italic extends Mark {
|
||||
|
||||
name = 'italic'
|
||||
@@ -23,4 +29,10 @@ export default class Italic extends Mark {
|
||||
}
|
||||
}
|
||||
|
||||
keys() {
|
||||
return {
|
||||
'Mod-i': () => this.editor.italic(),
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user