feat: refactor links

This commit is contained in:
Philipinho
2026-03-15 16:45:47 +00:00
parent ac6001ab25
commit 9d18c36eb3
18 changed files with 816 additions and 570 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 [
{