Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: fix note links not detected on paste/edit

Ammar Ahmedaca36b60b7ab
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<LinkOptions>({
});
},
- 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"
}
]
}),