From aca36b60b7abda29b5f4fbce069d1a41fe6d1d92 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Wed, 24 Jun 2026 22:33:45 +0500 Subject: [PATCH] editor: fix note links not detected on paste/edit --- packages/editor/src/extensions/link/link.ts | 6 +----- packages/editor/src/index.ts | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/editor/src/extensions/link/link.ts b/packages/editor/src/extensions/link/link.ts index 5211c9e16..35c59cf19 100644 --- a/packages/editor/src/extensions/link/link.ts +++ b/packages/editor/src/extensions/link/link.ts @@ -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({ }); }, - onDestroy() { - reset(); - }, - inclusive() { return this.options.autolink; }, diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.ts index cc8449401..0c04a44e8 100644 --- a/packages/editor/src/index.ts +++ b/packages/editor/src/index.ts @@ -291,8 +291,7 @@ const useTiptap = ( linkOnPaste: true, protocols: [ { - scheme: "nn", - optionalSlashes: true + scheme: "nn" } ] }),