Example of custom tiptap v2 link that is using vue router.
I use it in LoreHub
It will generate this HTML code:
// add link
this.editor
.chain()
.focus()
.extendMarkRange("link")
.setDocumentLink({ href: documentId })
.run();
// remove link
this.editor
.chain()
.focus()
.unsetDocumentLink()
.run();