UNPKG

tiptapify

Version:

Tiptap3 editor with Vuetify3 menu implementation

24 lines (19 loc) 458 B
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 }, } }, })