feat: refactor link menu (#2025)

* link markview - WIP

* WIP

* feat: refactor links

* cleanup
This commit is contained in:
Philip Okugbe
2026-03-15 17:08:59 +00:00
committed by GitHub
parent 97c459be67
commit 89b94e5d19
21 changed files with 944 additions and 219 deletions
+13
View File
@@ -6,6 +6,19 @@ import { EditorView } from "@tiptap/pm/view";
export const LinkExtension = TiptapLink.extend({
inclusive: false,
addAttributes() {
return {
...this.parent?.(),
internal: {
default: false,
parseHTML: (element: HTMLElement) =>
element.getAttribute('data-internal') === 'true',
renderHTML: (attributes) =>
attributes.internal ? { 'data-internal': 'true' } : {},
},
};
},
parseHTML() {
return [
{