From 181d8d87bac2e7b784f30867f95206da0ca7c76b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 2 Jun 2022 16:22:17 +0200 Subject: [PATCH] Up docs --- docs/api/undo_manager.md | 14 -------------- src/undo_manager/index.js | 3 ++- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/docs/api/undo_manager.md b/docs/api/undo_manager.md index 3fa12d85e..2e125b830 100644 --- a/docs/api/undo_manager.md +++ b/docs/api/undo_manager.md @@ -211,18 +211,6 @@ stack.each(item => ...); Returns **Collection** -## getStackGroup - -Get grouped undo manager stack. -The difference between `getStack` is when you do multiple operations at a time, -like appending multiple components: -`editor.getWrapper().append(`
C1
C2
`);` -`getStack` will return a collection length of 2. -`getStackGroup` instead will group them as a single operation (the first -inserted component will be returned in the list) by returning an array length of 1. - -Returns **[Array][17]** - ## clear Clear the stack @@ -266,5 +254,3 @@ Returns **this** [15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object [16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean - -[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array diff --git a/src/undo_manager/index.js b/src/undo_manager/index.js index eb222cda4..a3ffd218c 100644 --- a/src/undo_manager/index.js +++ b/src/undo_manager/index.js @@ -306,11 +306,12 @@ export default () => { * Get grouped undo manager stack. * The difference between `getStack` is when you do multiple operations at a time, * like appending multiple components: - * `editor.getWrapper().append(`
C1
C2
`);` + * `editor.getWrapper().append('
C1
C2
');` * `getStack` will return a collection length of 2. * `getStackGroup` instead will group them as a single operation (the first * inserted component will be returned in the list) by returning an array length of 1. * @return {Array} + * @private */ getStackGroup() { const result = [];