From 09fbb62ba9f28dca15c75c3a9804a6f0dd87ad1a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 4 Mar 2025 14:52:19 +0100 Subject: [PATCH] improve documentation on global UndoManager --- src/utils/UndoManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index 3cc395de..98410e4d 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -159,7 +159,7 @@ const popStackItem = (undoManager, stack, eventType) => { */ export class UndoManager extends ObservableV2 { /** - * @param {Doc|AbstractType|Array>} typeScope Accepts either a single type, or an array of types + * @param {Doc|AbstractType|Array>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types. * @param {UndoManagerOptions} options */ constructor (typeScope, { @@ -272,6 +272,8 @@ export class UndoManager extends ObservableV2 { } /** + * Extend the scope. + * * @param {Array | Doc> | AbstractType | Doc} ytypes */ addToScope (ytypes) {