blob: 8477c8dbd287e532a14bfd45ee5d64460ee2973e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { Mark } from '@tiptap/core';
import Code from '@tiptap/extension-code';
import { EXTENSION_PRIORITY_LOWER } from '../constants';
export default Code.extend({
excludes: null,
/**
* Reduce the rendering priority of the code mark to
* ensure the bold, italic, and strikethrough marks
* are rendered first.
*/
priority: EXTENSION_PRIORITY_LOWER,
addKeyboardShortcuts() {
return {
ArrowRight: () => {
return Mark.handleExit({ editor: this.editor, mark: this });
},
};
},
});
|