A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
editor: export & use AttributeUpdate interface Signed-off-by: 01zulfi <[email protected]>
01zulfib881b236a07c
diff --git a/packages/editor/src/extensions/heading/batch-attribute-step.ts b/packages/editor/src/extensions/heading/batch-attribute-step.tsindex 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.tsindex 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);