mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
Cleanup linkifyjs when the editor is destroyed (#3316)
This commit is contained in:
parent
a966059dc0
commit
1c493f3593
@ -1,5 +1,5 @@
|
||||
import { Mark, markPasteRule, mergeAttributes } from '@tiptap/core'
|
||||
import { find, registerCustomProtocol } from 'linkifyjs'
|
||||
import { find, registerCustomProtocol, reset } from 'linkifyjs'
|
||||
import { Plugin } from 'prosemirror-state'
|
||||
|
||||
import { autolink } from './helpers/autolink'
|
||||
@ -65,6 +65,10 @@ export const Link = Mark.create<LinkOptions>({
|
||||
this.options.protocols.forEach(registerCustomProtocol)
|
||||
},
|
||||
|
||||
onDestroy() {
|
||||
reset()
|
||||
},
|
||||
|
||||
inclusive() {
|
||||
return this.options.autolink
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user