editor: fix note links not detected on paste/edit

This commit is contained in:
Ammar Ahmed
2026-06-24 22:33:45 +05:00
committed by Abdullah Atta
parent 033666795c
commit aca36b60b7
2 changed files with 2 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ import {
PasteRuleMatch
} from "@tiptap/core";
import { Plugin, TextSelection } from "@tiptap/pm/state";
import { find, registerCustomProtocol, reset } from "linkifyjs";
import { find, registerCustomProtocol } from "linkifyjs";
import { autolink } from "./helpers/autolink.js";
import { clickHandler } from "./helpers/clickHandler.js";
import { pasteHandler } from "./helpers/pasteHandler.js";
@@ -114,10 +114,6 @@ export const Link = Mark.create<LinkOptions>({
});
},
onDestroy() {
reset();
},
inclusive() {
return this.options.autolink;
},

View File

@@ -291,8 +291,7 @@ const useTiptap = (
linkOnPaste: true,
protocols: [
{
scheme: "nn",
optionalSlashes: true
scheme: "nn"
}
]
}),