From ff8505661e6e2af214fb3daea0174dcc2cd3f084 Mon Sep 17 00:00:00 2001 From: ComputelessComputer Date: Mon, 23 Feb 2026 10:49:42 +0900 Subject: [PATCH] feat: add Transaction import from tiptap state Import Transaction type from @tiptap/pm/state to support enhanced editor functionality that requires direct transaction handling. --- packages/tiptap/src/shared/extensions/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tiptap/src/shared/extensions/index.ts b/packages/tiptap/src/shared/extensions/index.ts index 28e41acd3e..0a5be428ec 100644 --- a/packages/tiptap/src/shared/extensions/index.ts +++ b/packages/tiptap/src/shared/extensions/index.ts @@ -11,7 +11,7 @@ import { import TaskItem from "@tiptap/extension-task-item"; import TaskList from "@tiptap/extension-task-list"; import Underline from "@tiptap/extension-underline"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; +import { Plugin, PluginKey, Transaction } from "@tiptap/pm/state"; import StarterKit from "@tiptap/starter-kit"; import { AIHighlight } from "../ai-highlight"; @@ -149,7 +149,7 @@ export const getExtensions = ( if (!transactions.some((tr) => tr.docChanged)) return null; const linkType = newState.schema.marks.link; if (!linkType) return null; - let tr: ReturnType | null = null; + let tr: Transaction | null = null; newState.doc.descendants((node, pos) => { if (!node.isText || !node.text) return; const linkMark = node.marks.find((m) => m.type === linkType);