diff --git a/packages/editor/src/extensions/heading/batch-attribute-step.ts b/packages/editor/src/extensions/heading/batch-attribute-step.ts index f1a067c9a..6dec08802 100644 --- a/packages/editor/src/extensions/heading/batch-attribute-step.ts +++ b/packages/editor/src/extensions/heading/batch-attribute-step.ts @@ -21,7 +21,7 @@ import { Step, StepResult } from "@tiptap/pm/transform"; import { Node, Schema, Fragment } from "@tiptap/pm/model"; import { Mapping } from "@tiptap/pm/transform"; -interface AttributeUpdate { +export interface AttributeUpdate { pos: number; attrName: string; value: any; diff --git a/packages/editor/src/extensions/heading/heading.ts b/packages/editor/src/extensions/heading/heading.ts index 3f608c094..a16efc0ae 100644 --- a/packages/editor/src/extensions/heading/heading.ts +++ b/packages/editor/src/extensions/heading/heading.ts @@ -30,7 +30,7 @@ import { changedDescendants, findParentNodeOfTypeClosestToPos } from "../../utils/prosemirror.js"; -import { BatchAttributeStep } from "./batch-attribute-step.js"; +import { AttributeUpdate, BatchAttributeStep } from "./batch-attribute-step.js"; const COLLAPSIBLE_BLOCK_TYPES = [ "paragraph", @@ -318,7 +318,7 @@ function toggleNodesUnderPos( let shouldMoveCursor = false; let insideCollapsedHeading = false; let nestedHeadingLevel: number | null = null; - const updates: { pos: number; attrName: string; value: any }[] = []; + const updates: AttributeUpdate[] = []; while (nextPos < doc.content.size) { const nextNode = doc.nodeAt(nextPos);