From 74b644438829d6ee9b0795bc70c55f2755d7438c Mon Sep 17 00:00:00 2001 From: Manueljlin Date: Thu, 14 Sep 2023 17:05:16 +0200 Subject: [PATCH] fix: add missing attributes in extension-link (#4429) Despite `rel` and `class` already being defined as an attribute in `addAttributes()`, the interface was missing these two particular attributes so it wasn't accessible when using TypeScript without workarounds. --- packages/extension-link/src/link.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/extension-link/src/link.ts b/packages/extension-link/src/link.ts index 57afc05835..71f3e07a35 100644 --- a/packages/extension-link/src/link.ts +++ b/packages/extension-link/src/link.ts @@ -46,11 +46,11 @@ declare module '@tiptap/core' { /** * Set a link mark */ - setLink: (attributes: { href: string; target?: string | null }) => ReturnType + setLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null }) => ReturnType /** * Toggle a link mark */ - toggleLink: (attributes: { href: string; target?: string | null }) => ReturnType + toggleLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null }) => ReturnType /** * Unset a link mark */