diff --git a/ui/packages/editor/src/extensions/link/index.ts b/ui/packages/editor/src/extensions/link/index.ts index 508209803..6b022aa55 100644 --- a/ui/packages/editor/src/extensions/link/index.ts +++ b/ui/packages/editor/src/extensions/link/index.ts @@ -1,4 +1,3 @@ -import { mergeAttributes } from "@/tiptap/vue-3"; import type { ExtensionOptions } from "@/types"; import type { LinkOptions } from "@tiptap/extension-link"; import TiptapLink from "@tiptap/extension-link"; @@ -19,28 +18,6 @@ const Link = TiptapLink.extend({ // Remove the function of pasted text parsing as a link return []; }, - - renderHTML({ HTMLAttributes }) { - const href = HTMLAttributes.href; - // False positive; we're explicitly checking for javascript: links to ignore them - // eslint-disable-next-line no-script-url - if (href?.toString().startsWith("javascript:")) { - // strip out the href - return [ - "a", - mergeAttributes(this.options.HTMLAttributes, { - ...HTMLAttributes, - href: "", - }), - 0, - ]; - } - return [ - "a", - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), - 0, - ]; - }, }); export default Link;