tiptapify
Version:
Tiptap3 editor with Vuetify3 menu implementation
24 lines (19 loc) • 458 B
text/typescript
import Link from "@tiptap/extension-link";
const name: string = 'link'
export const TiptapifyLink = Link.extend({
name,
addCommands() {
return {
...this.parent?.(),
showLink: () => ({ editor }) => {
const event = new CustomEvent(`tiptapify-show-${name}`, {
detail: {
link: editor.getAttributes('link')
}
})
window.dispatchEvent(event)
return true
},
}
},
})