fix bug
This commit is contained in:
@@ -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 })),
|
||||
|
||||
Reference in New Issue
Block a user