mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
fix bug
This commit is contained in:
parent
54195d29eb
commit
f7153cfe66
@ -58,7 +58,7 @@ const Link = createMark({
|
||||
|
||||
addCommands() {
|
||||
return {
|
||||
link: (options: { href?: string, target?: string }): Command => ({ commands }) => {
|
||||
link: (options: { href?: string, target?: string } = {}): Command => ({ commands }) => {
|
||||
if (!options.href) {
|
||||
return commands.removeMark('link')
|
||||
}
|
||||
@ -68,12 +68,6 @@ const Link = createMark({
|
||||
}
|
||||
},
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-i': () => this.editor.italic(),
|
||||
}
|
||||
},
|
||||
|
||||
addPasteRules() {
|
||||
return [
|
||||
markPasteRule(pasteRegex, this.type, (url: string) => ({ href: url })),
|
||||
|
Loading…
Reference in New Issue
Block a user