@ckeditor/ckeditor5-engine 44.1.0 → 44.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +4 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +646 -77
- package/dist/index.js.map +1 -1
- package/package.json +23 -3
- package/src/controller/datacontroller.d.ts +1 -1
- package/src/controller/datacontroller.js +1 -1
- package/src/controller/editingcontroller.d.ts +1 -1
- package/src/controller/editingcontroller.js +1 -1
- package/src/conversion/conversion.d.ts +1 -1
- package/src/conversion/conversion.js +1 -1
- package/src/conversion/conversionhelpers.d.ts +1 -1
- package/src/conversion/conversionhelpers.js +1 -1
- package/src/conversion/downcastdispatcher.d.ts +1 -1
- package/src/conversion/downcastdispatcher.js +1 -1
- package/src/conversion/downcasthelpers.d.ts +1 -1
- package/src/conversion/downcasthelpers.js +1 -1
- package/src/conversion/mapper.d.ts +249 -20
- package/src/conversion/mapper.js +524 -38
- package/src/conversion/modelconsumable.d.ts +1 -1
- package/src/conversion/modelconsumable.js +1 -1
- package/src/conversion/upcastdispatcher.d.ts +1 -1
- package/src/conversion/upcastdispatcher.js +1 -1
- package/src/conversion/upcasthelpers.d.ts +1 -1
- package/src/conversion/upcasthelpers.js +1 -1
- package/src/conversion/viewconsumable.d.ts +1 -1
- package/src/conversion/viewconsumable.js +1 -1
- package/src/dataprocessor/basichtmlwriter.d.ts +1 -1
- package/src/dataprocessor/basichtmlwriter.js +1 -1
- package/src/dataprocessor/dataprocessor.d.ts +1 -1
- package/src/dataprocessor/dataprocessor.js +1 -1
- package/src/dataprocessor/htmldataprocessor.d.ts +1 -1
- package/src/dataprocessor/htmldataprocessor.js +1 -1
- package/src/dataprocessor/htmlwriter.d.ts +1 -1
- package/src/dataprocessor/htmlwriter.js +1 -1
- package/src/dataprocessor/xmldataprocessor.d.ts +1 -1
- package/src/dataprocessor/xmldataprocessor.js +1 -1
- package/src/dev-utils/model.d.ts +1 -1
- package/src/dev-utils/model.js +1 -1
- package/src/dev-utils/operationreplayer.d.ts +1 -1
- package/src/dev-utils/operationreplayer.js +1 -1
- package/src/dev-utils/utils.d.ts +1 -1
- package/src/dev-utils/utils.js +1 -1
- package/src/dev-utils/view.d.ts +1 -1
- package/src/dev-utils/view.js +1 -1
- package/src/index.d.ts +4 -2
- package/src/index.js +2 -1
- package/src/model/batch.d.ts +1 -1
- package/src/model/batch.js +7 -3
- package/src/model/differ.d.ts +1 -1
- package/src/model/differ.js +1 -1
- package/src/model/document.d.ts +1 -1
- package/src/model/document.js +1 -1
- package/src/model/documentfragment.d.ts +1 -1
- package/src/model/documentfragment.js +1 -1
- package/src/model/documentselection.d.ts +1 -1
- package/src/model/documentselection.js +1 -1
- package/src/model/element.d.ts +1 -1
- package/src/model/element.js +1 -1
- package/src/model/history.d.ts +1 -1
- package/src/model/history.js +1 -1
- package/src/model/item.d.ts +1 -1
- package/src/model/item.js +1 -1
- package/src/model/liveposition.d.ts +1 -1
- package/src/model/liveposition.js +1 -1
- package/src/model/liverange.d.ts +1 -1
- package/src/model/liverange.js +1 -1
- package/src/model/markercollection.d.ts +1 -1
- package/src/model/markercollection.js +1 -1
- package/src/model/model.d.ts +1 -1
- package/src/model/model.js +1 -1
- package/src/model/node.d.ts +1 -1
- package/src/model/node.js +1 -1
- package/src/model/nodelist.d.ts +1 -1
- package/src/model/nodelist.js +1 -1
- package/src/model/operation/attributeoperation.d.ts +1 -1
- package/src/model/operation/attributeoperation.js +1 -1
- package/src/model/operation/detachoperation.d.ts +1 -1
- package/src/model/operation/detachoperation.js +1 -1
- package/src/model/operation/insertoperation.d.ts +1 -1
- package/src/model/operation/insertoperation.js +1 -1
- package/src/model/operation/markeroperation.d.ts +1 -1
- package/src/model/operation/markeroperation.js +1 -1
- package/src/model/operation/mergeoperation.d.ts +1 -1
- package/src/model/operation/mergeoperation.js +1 -1
- package/src/model/operation/moveoperation.d.ts +1 -1
- package/src/model/operation/moveoperation.js +1 -1
- package/src/model/operation/nooperation.d.ts +1 -1
- package/src/model/operation/nooperation.js +1 -1
- package/src/model/operation/operation.d.ts +4 -1
- package/src/model/operation/operation.js +2 -2
- package/src/model/operation/operationfactory.d.ts +1 -1
- package/src/model/operation/operationfactory.js +1 -1
- package/src/model/operation/renameoperation.d.ts +1 -1
- package/src/model/operation/renameoperation.js +1 -1
- package/src/model/operation/rootattributeoperation.d.ts +1 -1
- package/src/model/operation/rootattributeoperation.js +1 -1
- package/src/model/operation/rootoperation.d.ts +1 -1
- package/src/model/operation/rootoperation.js +1 -1
- package/src/model/operation/splitoperation.d.ts +1 -1
- package/src/model/operation/splitoperation.js +1 -1
- package/src/model/operation/transform.d.ts +1 -1
- package/src/model/operation/transform.js +1 -1
- package/src/model/operation/utils.d.ts +1 -1
- package/src/model/operation/utils.js +1 -1
- package/src/model/position.d.ts +1 -1
- package/src/model/position.js +1 -1
- package/src/model/range.d.ts +1 -1
- package/src/model/range.js +1 -1
- package/src/model/rootelement.d.ts +1 -1
- package/src/model/rootelement.js +1 -1
- package/src/model/schema.d.ts +1 -1
- package/src/model/schema.js +1 -1
- package/src/model/selection.d.ts +1 -1
- package/src/model/selection.js +9 -2
- package/src/model/text.d.ts +1 -1
- package/src/model/text.js +1 -1
- package/src/model/textproxy.d.ts +1 -1
- package/src/model/textproxy.js +1 -1
- package/src/model/treewalker.d.ts +17 -1
- package/src/model/treewalker.js +26 -1
- package/src/model/typecheckable.d.ts +1 -1
- package/src/model/typecheckable.js +1 -1
- package/src/model/utils/autoparagraphing.d.ts +1 -1
- package/src/model/utils/autoparagraphing.js +1 -1
- package/src/model/utils/deletecontent.d.ts +1 -1
- package/src/model/utils/deletecontent.js +1 -1
- package/src/model/utils/getselectedcontent.d.ts +1 -1
- package/src/model/utils/getselectedcontent.js +1 -1
- package/src/model/utils/insertcontent.d.ts +1 -1
- package/src/model/utils/insertcontent.js +1 -1
- package/src/model/utils/insertobject.d.ts +1 -1
- package/src/model/utils/insertobject.js +1 -1
- package/src/model/utils/modifyselection.d.ts +1 -1
- package/src/model/utils/modifyselection.js +1 -1
- package/src/model/utils/selection-post-fixer.d.ts +1 -1
- package/src/model/utils/selection-post-fixer.js +1 -1
- package/src/model/writer.d.ts +1 -1
- package/src/model/writer.js +1 -1
- package/src/view/attributeelement.d.ts +1 -1
- package/src/view/attributeelement.js +1 -1
- package/src/view/containerelement.d.ts +1 -1
- package/src/view/containerelement.js +1 -1
- package/src/view/datatransfer.d.ts +1 -1
- package/src/view/datatransfer.js +1 -1
- package/src/view/document.d.ts +1 -1
- package/src/view/document.js +1 -1
- package/src/view/documentfragment.d.ts +6 -4
- package/src/view/documentfragment.js +7 -7
- package/src/view/documentselection.d.ts +1 -1
- package/src/view/documentselection.js +1 -1
- package/src/view/domconverter.d.ts +1 -1
- package/src/view/domconverter.js +1 -1
- package/src/view/downcastwriter.d.ts +1 -1
- package/src/view/downcastwriter.js +1 -1
- package/src/view/editableelement.d.ts +1 -1
- package/src/view/editableelement.js +1 -1
- package/src/view/element.d.ts +1 -1
- package/src/view/element.js +3 -3
- package/src/view/elementdefinition.d.ts +1 -1
- package/src/view/elementdefinition.js +1 -1
- package/src/view/emptyelement.d.ts +1 -1
- package/src/view/emptyelement.js +1 -1
- package/src/view/filler.d.ts +1 -1
- package/src/view/filler.js +1 -1
- package/src/view/item.d.ts +1 -1
- package/src/view/item.js +1 -1
- package/src/view/matcher.d.ts +1 -1
- package/src/view/matcher.js +1 -1
- package/src/view/node.d.ts +13 -4
- package/src/view/node.js +5 -4
- package/src/view/observer/arrowkeysobserver.d.ts +1 -1
- package/src/view/observer/arrowkeysobserver.js +1 -1
- package/src/view/observer/bubblingemittermixin.d.ts +1 -1
- package/src/view/observer/bubblingemittermixin.js +1 -1
- package/src/view/observer/bubblingeventinfo.d.ts +1 -1
- package/src/view/observer/bubblingeventinfo.js +1 -1
- package/src/view/observer/clickobserver.d.ts +1 -1
- package/src/view/observer/clickobserver.js +1 -1
- package/src/view/observer/compositionobserver.d.ts +1 -1
- package/src/view/observer/compositionobserver.js +1 -1
- package/src/view/observer/domeventdata.d.ts +1 -1
- package/src/view/observer/domeventdata.js +1 -1
- package/src/view/observer/domeventobserver.d.ts +1 -1
- package/src/view/observer/domeventobserver.js +1 -1
- package/src/view/observer/fakeselectionobserver.d.ts +1 -1
- package/src/view/observer/fakeselectionobserver.js +1 -1
- package/src/view/observer/focusobserver.d.ts +1 -1
- package/src/view/observer/focusobserver.js +1 -1
- package/src/view/observer/inputobserver.d.ts +1 -1
- package/src/view/observer/inputobserver.js +1 -1
- package/src/view/observer/keyobserver.d.ts +1 -1
- package/src/view/observer/keyobserver.js +1 -1
- package/src/view/observer/mouseobserver.d.ts +1 -1
- package/src/view/observer/mouseobserver.js +1 -1
- package/src/view/observer/mutationobserver.d.ts +1 -1
- package/src/view/observer/mutationobserver.js +1 -1
- package/src/view/observer/observer.d.ts +1 -1
- package/src/view/observer/observer.js +1 -1
- package/src/view/observer/selectionobserver.d.ts +1 -1
- package/src/view/observer/selectionobserver.js +1 -1
- package/src/view/observer/tabobserver.d.ts +1 -1
- package/src/view/observer/tabobserver.js +1 -1
- package/src/view/observer/touchobserver.d.ts +73 -0
- package/src/view/observer/touchobserver.js +29 -0
- package/src/view/placeholder.d.ts +1 -1
- package/src/view/placeholder.js +23 -17
- package/src/view/position.d.ts +1 -1
- package/src/view/position.js +1 -1
- package/src/view/range.d.ts +1 -1
- package/src/view/range.js +1 -1
- package/src/view/rawelement.d.ts +1 -1
- package/src/view/rawelement.js +1 -1
- package/src/view/renderer.d.ts +1 -1
- package/src/view/renderer.js +1 -1
- package/src/view/rooteditableelement.d.ts +1 -1
- package/src/view/rooteditableelement.js +1 -1
- package/src/view/selection.d.ts +1 -1
- package/src/view/selection.js +1 -1
- package/src/view/styles/background.d.ts +1 -1
- package/src/view/styles/background.js +1 -1
- package/src/view/styles/border.d.ts +1 -1
- package/src/view/styles/border.js +1 -1
- package/src/view/styles/margin.d.ts +1 -1
- package/src/view/styles/margin.js +1 -1
- package/src/view/styles/padding.d.ts +1 -1
- package/src/view/styles/padding.js +1 -1
- package/src/view/styles/utils.d.ts +1 -1
- package/src/view/styles/utils.js +1 -1
- package/src/view/stylesmap.d.ts +1 -1
- package/src/view/stylesmap.js +1 -1
- package/src/view/text.d.ts +1 -1
- package/src/view/text.js +1 -1
- package/src/view/textproxy.d.ts +1 -1
- package/src/view/textproxy.js +1 -1
- package/src/view/treewalker.d.ts +17 -1
- package/src/view/treewalker.js +25 -1
- package/src/view/typecheckable.d.ts +1 -1
- package/src/view/typecheckable.js +1 -1
- package/src/view/uielement.d.ts +1 -1
- package/src/view/uielement.js +1 -1
- package/src/view/upcastwriter.d.ts +1 -1
- package/src/view/upcastwriter.js +1 -1
- package/src/view/view.d.ts +1 -1
- package/src/view/view.js +1 -1
- package/theme/placeholder.css +1 -1
- package/theme/renderer.css +1 -1
- package/dist/controller/datacontroller.d.ts +0 -339
- package/dist/controller/editingcontroller.d.ts +0 -102
- package/dist/conversion/conversion.d.ts +0 -482
- package/dist/conversion/conversionhelpers.d.ts +0 -30
- package/dist/conversion/downcastdispatcher.d.ts +0 -566
- package/dist/conversion/downcasthelpers.d.ts +0 -1194
- package/dist/conversion/mapper.d.ts +0 -507
- package/dist/conversion/modelconsumable.d.ts +0 -205
- package/dist/conversion/upcastdispatcher.d.ts +0 -496
- package/dist/conversion/upcasthelpers.d.ts +0 -503
- package/dist/conversion/viewconsumable.d.ts +0 -373
- package/dist/dataprocessor/basichtmlwriter.d.ts +0 -22
- package/dist/dataprocessor/dataprocessor.d.ts +0 -65
- package/dist/dataprocessor/htmldataprocessor.d.ts +0 -80
- package/dist/dataprocessor/htmlwriter.d.ts +0 -20
- package/dist/dataprocessor/xmldataprocessor.d.ts +0 -94
- package/dist/dev-utils/model.d.ts +0 -130
- package/dist/dev-utils/operationreplayer.d.ts +0 -55
- package/dist/dev-utils/utils.d.ts +0 -41
- package/dist/dev-utils/view.d.ts +0 -324
- package/dist/index.d.ts +0 -122
- package/dist/model/batch.d.ts +0 -110
- package/dist/model/differ.d.ts +0 -511
- package/dist/model/document.d.ts +0 -278
- package/dist/model/documentfragment.d.ts +0 -223
- package/dist/model/documentselection.d.ts +0 -424
- package/dist/model/element.d.ts +0 -191
- package/dist/model/history.d.ts +0 -118
- package/dist/model/item.d.ts +0 -18
- package/dist/model/liveposition.d.ts +0 -81
- package/dist/model/liverange.d.ts +0 -106
- package/dist/model/markercollection.d.ts +0 -339
- package/dist/model/model.d.ts +0 -923
- package/dist/model/node.d.ts +0 -262
- package/dist/model/nodelist.d.ts +0 -119
- package/dist/model/operation/attributeoperation.d.ts +0 -107
- package/dist/model/operation/detachoperation.d.ts +0 -64
- package/dist/model/operation/insertoperation.d.ts +0 -94
- package/dist/model/operation/markeroperation.d.ts +0 -95
- package/dist/model/operation/mergeoperation.d.ts +0 -104
- package/dist/model/operation/moveoperation.d.ts +0 -100
- package/dist/model/operation/nooperation.d.ts +0 -42
- package/dist/model/operation/operation.d.ts +0 -100
- package/dist/model/operation/operationfactory.d.ts +0 -22
- package/dist/model/operation/renameoperation.d.ts +0 -87
- package/dist/model/operation/rootattributeoperation.d.ts +0 -102
- package/dist/model/operation/rootoperation.d.ts +0 -80
- package/dist/model/operation/splitoperation.d.ts +0 -113
- package/dist/model/operation/transform.d.ts +0 -104
- package/dist/model/operation/utils.d.ts +0 -75
- package/dist/model/position.d.ts +0 -549
- package/dist/model/range.d.ts +0 -462
- package/dist/model/rootelement.d.ts +0 -64
- package/dist/model/schema.d.ts +0 -1334
- package/dist/model/selection.d.ts +0 -486
- package/dist/model/text.d.ts +0 -70
- package/dist/model/textproxy.d.ts +0 -148
- package/dist/model/treewalker.d.ts +0 -190
- package/dist/model/typecheckable.d.ts +0 -289
- package/dist/model/utils/autoparagraphing.d.ts +0 -41
- package/dist/model/utils/deletecontent.d.ts +0 -62
- package/dist/model/utils/getselectedcontent.d.ts +0 -34
- package/dist/model/utils/insertcontent.d.ts +0 -50
- package/dist/model/utils/insertobject.d.ts +0 -51
- package/dist/model/utils/modifyselection.d.ts +0 -52
- package/dist/model/utils/selection-post-fixer.d.ts +0 -78
- package/dist/model/writer.d.ts +0 -855
- package/dist/view/attributeelement.d.ts +0 -112
- package/dist/view/containerelement.d.ts +0 -53
- package/dist/view/datatransfer.d.ts +0 -83
- package/dist/view/document.d.ts +0 -188
- package/dist/view/documentfragment.d.ts +0 -157
- package/dist/view/documentselection.d.ts +0 -310
- package/dist/view/domconverter.d.ts +0 -665
- package/dist/view/downcastwriter.d.ts +0 -1000
- package/dist/view/editableelement.d.ts +0 -66
- package/dist/view/element.d.ts +0 -472
- package/dist/view/elementdefinition.d.ts +0 -91
- package/dist/view/emptyelement.d.ts +0 -45
- package/dist/view/filler.d.ts +0 -115
- package/dist/view/item.d.ts +0 -18
- package/dist/view/matcher.d.ts +0 -490
- package/dist/view/node.d.ts +0 -166
- package/dist/view/observer/arrowkeysobserver.d.ts +0 -49
- package/dist/view/observer/bubblingemittermixin.d.ts +0 -170
- package/dist/view/observer/bubblingeventinfo.d.ts +0 -51
- package/dist/view/observer/clickobserver.d.ts +0 -47
- package/dist/view/observer/compositionobserver.d.ts +0 -86
- package/dist/view/observer/domeventdata.d.ts +0 -54
- package/dist/view/observer/domeventobserver.d.ts +0 -82
- package/dist/view/observer/fakeselectionobserver.d.ts +0 -51
- package/dist/view/observer/focusobserver.d.ts +0 -98
- package/dist/view/observer/inputobserver.d.ts +0 -90
- package/dist/view/observer/keyobserver.d.ts +0 -70
- package/dist/view/observer/mouseobserver.d.ts +0 -93
- package/dist/view/observer/mutationobserver.d.ts +0 -119
- package/dist/view/observer/observer.d.ts +0 -93
- package/dist/view/observer/selectionobserver.d.ts +0 -151
- package/dist/view/observer/tabobserver.d.ts +0 -50
- package/dist/view/placeholder.d.ts +0 -100
- package/dist/view/position.d.ts +0 -192
- package/dist/view/range.d.ts +0 -283
- package/dist/view/rawelement.d.ts +0 -77
- package/dist/view/renderer.d.ts +0 -281
- package/dist/view/rooteditableelement.d.ts +0 -45
- package/dist/view/selection.d.ts +0 -379
- package/dist/view/styles/background.d.ts +0 -37
- package/dist/view/styles/border.d.ts +0 -47
- package/dist/view/styles/margin.d.ts +0 -33
- package/dist/view/styles/padding.d.ts +0 -33
- package/dist/view/styles/utils.d.ts +0 -97
- package/dist/view/stylesmap.d.ts +0 -685
- package/dist/view/text.d.ts +0 -78
- package/dist/view/textproxy.d.ts +0 -101
- package/dist/view/treewalker.d.ts +0 -199
- package/dist/view/typecheckable.d.ts +0 -452
- package/dist/view/uielement.d.ts +0 -100
- package/dist/view/upcastwriter.d.ts +0 -421
- package/dist/view/view.d.ts +0 -488
package/dist/model/document.d.ts
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/document
|
|
11
|
-
*/
|
|
12
|
-
import Differ from './differ.js';
|
|
13
|
-
import DocumentSelection from './documentselection.js';
|
|
14
|
-
import History from './history.js';
|
|
15
|
-
import RootElement from './rootelement.js';
|
|
16
|
-
import type { default as Model } from './model.js';
|
|
17
|
-
import type Batch from './batch.js';
|
|
18
|
-
import type Range from './range.js';
|
|
19
|
-
import type Writer from './writer.js';
|
|
20
|
-
import { Collection } from '@ckeditor/ckeditor5-utils';
|
|
21
|
-
declare const Document_base: {
|
|
22
|
-
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
23
|
-
prototype: import("@ckeditor/ckeditor5-utils").Emitter; /**
|
|
24
|
-
* The model differ object. Its role is to buffer changes done on the model document and then calculate a diff of those changes.
|
|
25
|
-
*/
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Data model's document. It contains the model's structure, its selection and the history of changes.
|
|
29
|
-
*
|
|
30
|
-
* Read more about working with the model in
|
|
31
|
-
* {@glink framework/architecture/editing-engine#model introduction to the the editing engine's architecture}.
|
|
32
|
-
*
|
|
33
|
-
* Usually, the document contains just one {@link module:engine/model/document~Document#roots root element}, so
|
|
34
|
-
* you can retrieve it by just calling {@link module:engine/model/document~Document#getRoot} without specifying its name:
|
|
35
|
-
*
|
|
36
|
-
* ```ts
|
|
37
|
-
* model.document.getRoot(); // -> returns the main root
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* However, the document may contain multiple roots – e.g. when the editor has multiple editable areas
|
|
41
|
-
* (e.g. a title and a body of a message).
|
|
42
|
-
*/
|
|
43
|
-
export default class Document extends /* #__PURE__ */ Document_base {
|
|
44
|
-
/**
|
|
45
|
-
* The {@link module:engine/model/model~Model model} that the document is a part of.
|
|
46
|
-
*/
|
|
47
|
-
readonly model: Model;
|
|
48
|
-
/**
|
|
49
|
-
* The document's history.
|
|
50
|
-
*/
|
|
51
|
-
readonly history: History;
|
|
52
|
-
/**
|
|
53
|
-
* The selection in this document.
|
|
54
|
-
*/
|
|
55
|
-
readonly selection: DocumentSelection;
|
|
56
|
-
/**
|
|
57
|
-
* A list of roots that are owned and managed by this document. Use {@link #createRoot}, {@link #getRoot} and
|
|
58
|
-
* {@link #getRootNames} to manipulate it.
|
|
59
|
-
*/
|
|
60
|
-
readonly roots: Collection<RootElement>;
|
|
61
|
-
/**
|
|
62
|
-
* The model differ object. Its role is to buffer changes done on the model document and then calculate a diff of those changes.
|
|
63
|
-
*/
|
|
64
|
-
readonly differ: Differ;
|
|
65
|
-
/**
|
|
66
|
-
* Defines whether the document is in a read-only mode.
|
|
67
|
-
*
|
|
68
|
-
* The user should not be able to change the data of a document that is read-only.
|
|
69
|
-
*
|
|
70
|
-
* @readonly
|
|
71
|
-
*/
|
|
72
|
-
isReadOnly: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Post-fixer callbacks registered to the model document.
|
|
75
|
-
*/
|
|
76
|
-
private readonly _postFixers;
|
|
77
|
-
/**
|
|
78
|
-
* A flag that indicates whether the selection has changed since last change block.
|
|
79
|
-
*/
|
|
80
|
-
private _hasSelectionChangedFromTheLastChangeBlock;
|
|
81
|
-
/**
|
|
82
|
-
* Creates an empty document instance with no {@link #roots} (other than
|
|
83
|
-
* the {@link #graveyard graveyard root}).
|
|
84
|
-
*/
|
|
85
|
-
constructor(model: Model);
|
|
86
|
-
/**
|
|
87
|
-
* The document version. Every applied operation increases the version number. It is used to
|
|
88
|
-
* ensure that operations are applied on a proper document version.
|
|
89
|
-
*
|
|
90
|
-
* This property is equal to {@link module:engine/model/history~History#version `model.Document#history#version`}.
|
|
91
|
-
*
|
|
92
|
-
* If the {@link module:engine/model/operation/operation~Operation#baseVersion base version} does not match the document version,
|
|
93
|
-
* a {@link module:utils/ckeditorerror~CKEditorError model-document-applyoperation-wrong-version} error is thrown.
|
|
94
|
-
*/
|
|
95
|
-
get version(): number;
|
|
96
|
-
set version(version: number);
|
|
97
|
-
/**
|
|
98
|
-
* The graveyard tree root. A document always has a graveyard root that stores removed nodes.
|
|
99
|
-
*/
|
|
100
|
-
get graveyard(): RootElement;
|
|
101
|
-
/**
|
|
102
|
-
* Creates a new root.
|
|
103
|
-
*
|
|
104
|
-
* **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use
|
|
105
|
-
* {@link module:engine/model/writer~Writer#addRoot `model.Writer#addRoot`} instead.
|
|
106
|
-
*
|
|
107
|
-
* @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined
|
|
108
|
-
* (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.
|
|
109
|
-
* @param rootName A unique root name.
|
|
110
|
-
* @returns The created root.
|
|
111
|
-
*/
|
|
112
|
-
createRoot(elementName?: string, rootName?: string): RootElement;
|
|
113
|
-
/**
|
|
114
|
-
* Removes all event listeners set by the document instance.
|
|
115
|
-
*/
|
|
116
|
-
destroy(): void;
|
|
117
|
-
/**
|
|
118
|
-
* Returns a root by its name.
|
|
119
|
-
*
|
|
120
|
-
* Detached roots are returned by this method. This is to be able to operate on the detached root (for example, to be able to create
|
|
121
|
-
* a position inside such a root for undo feature purposes).
|
|
122
|
-
*
|
|
123
|
-
* @param name The root name of the root to return.
|
|
124
|
-
* @returns The root registered under a given name or `null` when there is no root with the given name.
|
|
125
|
-
*/
|
|
126
|
-
getRoot(name?: string): RootElement | null;
|
|
127
|
-
/**
|
|
128
|
-
* Returns an array with names of all roots added to the document (except the {@link #graveyard graveyard root}).
|
|
129
|
-
*
|
|
130
|
-
* Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate
|
|
131
|
-
* on the document data know which roots are still a part of the document and should be processed.
|
|
132
|
-
*
|
|
133
|
-
* @param includeDetached Specified whether detached roots should be returned as well.
|
|
134
|
-
*/
|
|
135
|
-
getRootNames(includeDetached?: boolean): Array<string>;
|
|
136
|
-
/**
|
|
137
|
-
* Returns an array with all roots added to the document (except the {@link #graveyard graveyard root}).
|
|
138
|
-
*
|
|
139
|
-
* Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate
|
|
140
|
-
* on the document data know which roots are still a part of the document and should be processed.
|
|
141
|
-
*
|
|
142
|
-
* @param includeDetached Specified whether detached roots should be returned as well.
|
|
143
|
-
*/
|
|
144
|
-
getRoots(includeDetached?: boolean): Array<RootElement>;
|
|
145
|
-
/**
|
|
146
|
-
* Used to register a post-fixer callback. A post-fixer mechanism guarantees that the features
|
|
147
|
-
* will operate on a correct model state.
|
|
148
|
-
*
|
|
149
|
-
* An execution of a feature may lead to an incorrect document tree state. The callbacks are used to fix the document tree after
|
|
150
|
-
* it has changed. Post-fixers are fired just after all changes from the outermost change block were applied but
|
|
151
|
-
* before the {@link module:engine/model/document~Document#event:change change event} is fired. If a post-fixer callback made
|
|
152
|
-
* a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should
|
|
153
|
-
* not be fixed in the new document tree state.
|
|
154
|
-
*
|
|
155
|
-
* As a parameter, a post-fixer callback receives a {@link module:engine/model/writer~Writer writer} instance connected with the
|
|
156
|
-
* executed changes block. Thanks to that, all changes done by the callback will be added to the same
|
|
157
|
-
* {@link module:engine/model/batch~Batch batch} (and undo step) as the original changes. This makes post-fixer changes transparent
|
|
158
|
-
* for the user.
|
|
159
|
-
*
|
|
160
|
-
* An example of a post-fixer is a callback that checks if all the data were removed from the editor. If so, the
|
|
161
|
-
* callback should add an empty paragraph so that the editor is never empty:
|
|
162
|
-
*
|
|
163
|
-
* ```ts
|
|
164
|
-
* document.registerPostFixer( writer => {
|
|
165
|
-
* const changes = document.differ.getChanges();
|
|
166
|
-
*
|
|
167
|
-
* // Check if the changes lead to an empty root in the editor.
|
|
168
|
-
* for ( const entry of changes ) {
|
|
169
|
-
* if ( entry.type == 'remove' && entry.position.root.isEmpty ) {
|
|
170
|
-
* writer.insertElement( 'paragraph', entry.position.root, 0 );
|
|
171
|
-
*
|
|
172
|
-
* // It is fine to return early, even if multiple roots would need to be fixed.
|
|
173
|
-
* // All post-fixers will be fired again, so if there are more empty roots, those will be fixed, too.
|
|
174
|
-
* return true;
|
|
175
|
-
* }
|
|
176
|
-
* }
|
|
177
|
-
*
|
|
178
|
-
* return false;
|
|
179
|
-
* } );
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
registerPostFixer(postFixer: ModelPostFixer): void;
|
|
183
|
-
/**
|
|
184
|
-
* A custom `toJSON()` method to solve child-parent circular dependencies.
|
|
185
|
-
*
|
|
186
|
-
* @returns A clone of this object with the document property changed to a string.
|
|
187
|
-
*/
|
|
188
|
-
toJSON(): unknown;
|
|
189
|
-
/**
|
|
190
|
-
* Check if there were any changes done on document, and if so, call post-fixers,
|
|
191
|
-
* fire `change` event for features and conversion and then reset the differ.
|
|
192
|
-
* Fire `change:data` event when at least one operation or buffered marker changes the data.
|
|
193
|
-
*
|
|
194
|
-
* @internal
|
|
195
|
-
* @fires change
|
|
196
|
-
* @fires change:data
|
|
197
|
-
* @param writer The writer on which post-fixers will be called.
|
|
198
|
-
*/
|
|
199
|
-
_handleChangeBlock(writer: Writer): void;
|
|
200
|
-
/**
|
|
201
|
-
* Returns whether there is a buffered change or if the selection has changed from the last
|
|
202
|
-
* {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block}
|
|
203
|
-
* or {@link module:engine/model/model~Model#change `change()` block}.
|
|
204
|
-
*
|
|
205
|
-
* @returns Returns `true` if document has changed from the last `change()` or `enqueueChange()` block.
|
|
206
|
-
*/
|
|
207
|
-
protected _hasDocumentChangedFromTheLastChangeBlock(): boolean;
|
|
208
|
-
/**
|
|
209
|
-
* Returns the default root for this document which is either the first root that was added to the document using
|
|
210
|
-
* {@link #createRoot} or the {@link #graveyard graveyard root} if no other roots were created.
|
|
211
|
-
*
|
|
212
|
-
* @returns The default root for this document.
|
|
213
|
-
*/
|
|
214
|
-
protected _getDefaultRoot(): RootElement;
|
|
215
|
-
/**
|
|
216
|
-
* Returns the default range for this selection. The default range is a collapsed range that starts and ends
|
|
217
|
-
* at the beginning of this selection's document {@link #_getDefaultRoot default root}.
|
|
218
|
-
*
|
|
219
|
-
* @internal
|
|
220
|
-
*/
|
|
221
|
-
_getDefaultRange(): Range;
|
|
222
|
-
/**
|
|
223
|
-
* Checks whether a given {@link module:engine/model/range~Range range} is a valid range for
|
|
224
|
-
* the {@link #selection document's selection}.
|
|
225
|
-
*
|
|
226
|
-
* @internal
|
|
227
|
-
* @param range A range to check.
|
|
228
|
-
* @returns `true` if `range` is valid, `false` otherwise.
|
|
229
|
-
*/
|
|
230
|
-
_validateSelectionRange(range: Range): boolean;
|
|
231
|
-
/**
|
|
232
|
-
* Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.
|
|
233
|
-
*
|
|
234
|
-
* @param writer The writer on which post-fixer callbacks will be called.
|
|
235
|
-
*/
|
|
236
|
-
private _callPostFixers;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Fired after each {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block} or the outermost
|
|
240
|
-
* {@link module:engine/model/model~Model#change `change()` block} was executed and the document was changed
|
|
241
|
-
* during that block's execution.
|
|
242
|
-
*
|
|
243
|
-
* The changes which this event will cover include:
|
|
244
|
-
*
|
|
245
|
-
* * document structure changes,
|
|
246
|
-
* * selection changes,
|
|
247
|
-
* * marker changes.
|
|
248
|
-
*
|
|
249
|
-
* If you want to be notified about all these changes, then simply listen to this event like this:
|
|
250
|
-
*
|
|
251
|
-
* ```ts
|
|
252
|
-
* model.document.on( 'change', () => {
|
|
253
|
-
* console.log( 'The document has changed!' );
|
|
254
|
-
* } );
|
|
255
|
-
* ```
|
|
256
|
-
*
|
|
257
|
-
* If, however, you only want to be notified about the data changes, then use `change:data` event,
|
|
258
|
-
* which is fired for document structure changes and marker changes (which affects the data).
|
|
259
|
-
*
|
|
260
|
-
* ```ts
|
|
261
|
-
* model.document.on( 'change:data', () => {
|
|
262
|
-
* console.log( 'The data has changed!' );
|
|
263
|
-
* } );
|
|
264
|
-
* ```
|
|
265
|
-
*
|
|
266
|
-
* @eventName ~Document#change
|
|
267
|
-
* @eventName ~Document#change:data
|
|
268
|
-
* @param batch The batch that was used in the executed changes block.
|
|
269
|
-
*/
|
|
270
|
-
export type DocumentChangeEvent = {
|
|
271
|
-
name: 'change' | 'change:data';
|
|
272
|
-
args: [batch: Batch];
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* Callback passed as an argument to the {@link module:engine/model/document~Document#registerPostFixer} method.
|
|
276
|
-
*/
|
|
277
|
-
export type ModelPostFixer = (writer: Writer) => boolean;
|
|
278
|
-
export {};
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/documentfragment
|
|
11
|
-
*/
|
|
12
|
-
import TypeCheckable from './typecheckable.js';
|
|
13
|
-
import type Item from './item.js';
|
|
14
|
-
import type Node from './node.js';
|
|
15
|
-
import type Range from './range.js';
|
|
16
|
-
/**
|
|
17
|
-
* DocumentFragment represents a part of model which does not have a common root but its top-level nodes
|
|
18
|
-
* can be seen as siblings. In other words, it is a detached part of model tree, without a root.
|
|
19
|
-
*
|
|
20
|
-
* DocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection
|
|
21
|
-
* will be set to the {@link module:engine/model/model~Model#markers model markers} by a
|
|
22
|
-
* {@link module:engine/model/writer~Writer#insert} function.
|
|
23
|
-
*/
|
|
24
|
-
export default class DocumentFragment extends TypeCheckable implements Iterable<Node> {
|
|
25
|
-
/**
|
|
26
|
-
* DocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~Range ranges}
|
|
27
|
-
* which will be set as Markers to {@link module:engine/model/model~Model#markers model markers collection}
|
|
28
|
-
* when DocumentFragment will be inserted to the document.
|
|
29
|
-
*/
|
|
30
|
-
readonly markers: Map<string, Range>;
|
|
31
|
-
/**
|
|
32
|
-
* Artificial element name. Returns `undefined`. Added for compatibility reasons.
|
|
33
|
-
*/
|
|
34
|
-
name?: undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Artificial root name. Returns `undefined`. Added for compatibility reasons.
|
|
37
|
-
*/
|
|
38
|
-
rootName?: undefined;
|
|
39
|
-
/**
|
|
40
|
-
* List of nodes contained inside the document fragment.
|
|
41
|
-
*/
|
|
42
|
-
private readonly _children;
|
|
43
|
-
/**
|
|
44
|
-
* Creates an empty `DocumentFragment`.
|
|
45
|
-
*
|
|
46
|
-
* **Note:** Constructor of this class shouldn't be used directly in the code.
|
|
47
|
-
* Use the {@link module:engine/model/writer~Writer#createDocumentFragment} method instead.
|
|
48
|
-
*
|
|
49
|
-
* @internal
|
|
50
|
-
* @param children Nodes to be contained inside the `DocumentFragment`.
|
|
51
|
-
*/
|
|
52
|
-
constructor(children?: Node | Iterable<Node>);
|
|
53
|
-
/**
|
|
54
|
-
* Returns an iterator that iterates over all nodes contained inside this document fragment.
|
|
55
|
-
*/
|
|
56
|
-
[Symbol.iterator](): IterableIterator<Node>;
|
|
57
|
-
/**
|
|
58
|
-
* Number of this document fragment's children.
|
|
59
|
-
*/
|
|
60
|
-
get childCount(): number;
|
|
61
|
-
/**
|
|
62
|
-
* Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all of this document fragment's children.
|
|
63
|
-
*/
|
|
64
|
-
get maxOffset(): number;
|
|
65
|
-
/**
|
|
66
|
-
* Is `true` if there are no nodes inside this document fragment, `false` otherwise.
|
|
67
|
-
*/
|
|
68
|
-
get isEmpty(): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Artificial next sibling. Returns `null`. Added for compatibility reasons.
|
|
71
|
-
*/
|
|
72
|
-
get nextSibling(): null;
|
|
73
|
-
/**
|
|
74
|
-
* Artificial previous sibling. Returns `null`. Added for compatibility reasons.
|
|
75
|
-
*/
|
|
76
|
-
get previousSibling(): null;
|
|
77
|
-
/**
|
|
78
|
-
* Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.
|
|
79
|
-
*/
|
|
80
|
-
get root(): DocumentFragment;
|
|
81
|
-
/**
|
|
82
|
-
* Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.
|
|
83
|
-
*/
|
|
84
|
-
get parent(): null;
|
|
85
|
-
/**
|
|
86
|
-
* Artificial owner of `DocumentFragment`. Returns `null`. Added for compatibility reasons.
|
|
87
|
-
*/
|
|
88
|
-
get document(): null;
|
|
89
|
-
/**
|
|
90
|
-
* Returns `false` as `DocumentFragment` by definition is not attached to a document. Added for compatibility reasons.
|
|
91
|
-
*/
|
|
92
|
-
isAttached(): false;
|
|
93
|
-
/**
|
|
94
|
-
* Returns empty array. Added for compatibility reasons.
|
|
95
|
-
*/
|
|
96
|
-
getAncestors(): Array<never>;
|
|
97
|
-
/**
|
|
98
|
-
* Gets the child at the given index. Returns `null` if incorrect index was passed.
|
|
99
|
-
*
|
|
100
|
-
* @param index Index in this document fragment.
|
|
101
|
-
* @returns Child node.
|
|
102
|
-
*/
|
|
103
|
-
getChild(index: number): Node | null;
|
|
104
|
-
/**
|
|
105
|
-
* Gets the child at the given offset. Returns `null` if incorrect index was passed.
|
|
106
|
-
*
|
|
107
|
-
* @param offset Offset in this document fragment.
|
|
108
|
-
* @returns Child node.
|
|
109
|
-
*/
|
|
110
|
-
getChildAtOffset(offset: number): Node | null;
|
|
111
|
-
/**
|
|
112
|
-
* Returns an iterator that iterates over all of this document fragment's children.
|
|
113
|
-
*/
|
|
114
|
-
getChildren(): IterableIterator<Node>;
|
|
115
|
-
/**
|
|
116
|
-
* Returns an index of the given child node. Returns `null` if given node is not a child of this document fragment.
|
|
117
|
-
*
|
|
118
|
-
* @param node Child node to look for.
|
|
119
|
-
* @returns Child node's index.
|
|
120
|
-
*/
|
|
121
|
-
getChildIndex(node: Node): number | null;
|
|
122
|
-
/**
|
|
123
|
-
* Returns the starting offset of given child. Starting offset is equal to the sum of
|
|
124
|
-
* {@link module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if
|
|
125
|
-
* given node is not a child of this document fragment.
|
|
126
|
-
*
|
|
127
|
-
* @param node Child node to look for.
|
|
128
|
-
* @returns Child node's starting offset.
|
|
129
|
-
*/
|
|
130
|
-
getChildStartOffset(node: Node): number | null;
|
|
131
|
-
/**
|
|
132
|
-
* Returns path to a `DocumentFragment`, which is an empty array. Added for compatibility reasons.
|
|
133
|
-
*/
|
|
134
|
-
getPath(): Array<number>;
|
|
135
|
-
/**
|
|
136
|
-
* Returns a descendant node by its path relative to this element.
|
|
137
|
-
*
|
|
138
|
-
* ```ts
|
|
139
|
-
* // <this>a<b>c</b></this>
|
|
140
|
-
* this.getNodeByPath( [ 0 ] ); // -> "a"
|
|
141
|
-
* this.getNodeByPath( [ 1 ] ); // -> <b>
|
|
142
|
-
* this.getNodeByPath( [ 1, 0 ] ); // -> "c"
|
|
143
|
-
* ```
|
|
144
|
-
*
|
|
145
|
-
* @param relativePath Path of the node to find, relative to this element.
|
|
146
|
-
*/
|
|
147
|
-
getNodeByPath(relativePath: Array<number>): Node | DocumentFragment;
|
|
148
|
-
/**
|
|
149
|
-
* Converts offset "position" to index "position".
|
|
150
|
-
*
|
|
151
|
-
* Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is
|
|
152
|
-
* too high, returns index after last child.
|
|
153
|
-
*
|
|
154
|
-
* ```ts
|
|
155
|
-
* const textNode = new Text( 'foo' );
|
|
156
|
-
* const pElement = new Element( 'p' );
|
|
157
|
-
* const docFrag = new DocumentFragment( [ textNode, pElement ] );
|
|
158
|
-
* docFrag.offsetToIndex( -1 ); // Returns 0, because offset is too low.
|
|
159
|
-
* docFrag.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.
|
|
160
|
-
* docFrag.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.
|
|
161
|
-
* docFrag.offsetToIndex( 2 ); // Returns 0.
|
|
162
|
-
* docFrag.offsetToIndex( 3 ); // Returns 1.
|
|
163
|
-
* docFrag.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.
|
|
164
|
-
* ```
|
|
165
|
-
*
|
|
166
|
-
* @param offset Offset to look for.
|
|
167
|
-
* @returns Index of a node that occupies given offset.
|
|
168
|
-
*/
|
|
169
|
-
offsetToIndex(offset: number): number;
|
|
170
|
-
/**
|
|
171
|
-
* Converts `DocumentFragment` instance to plain object and returns it.
|
|
172
|
-
* Takes care of converting all of this document fragment's children.
|
|
173
|
-
*
|
|
174
|
-
* @returns `DocumentFragment` instance converted to plain object.
|
|
175
|
-
*/
|
|
176
|
-
toJSON(): unknown;
|
|
177
|
-
/**
|
|
178
|
-
* Creates a `DocumentFragment` instance from given plain object (i.e. parsed JSON string).
|
|
179
|
-
* Converts `DocumentFragment` children to proper nodes.
|
|
180
|
-
*
|
|
181
|
-
* @param json Plain object to be converted to `DocumentFragment`.
|
|
182
|
-
* @returns `DocumentFragment` instance created using given plain object.
|
|
183
|
-
*/
|
|
184
|
-
static fromJSON(json: any): DocumentFragment;
|
|
185
|
-
/**
|
|
186
|
-
* {@link #_insertChild Inserts} one or more nodes at the end of this document fragment.
|
|
187
|
-
*
|
|
188
|
-
* @internal
|
|
189
|
-
* @param items Items to be inserted.
|
|
190
|
-
*/
|
|
191
|
-
_appendChild(items: string | Item | Iterable<string | Item>): void;
|
|
192
|
-
/**
|
|
193
|
-
* Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes
|
|
194
|
-
* to this document fragment.
|
|
195
|
-
*
|
|
196
|
-
* @internal
|
|
197
|
-
* @param index Index at which nodes should be inserted.
|
|
198
|
-
* @param items Items to be inserted.
|
|
199
|
-
*/
|
|
200
|
-
_insertChild(index: number, items: string | Item | Iterable<string | Item>): void;
|
|
201
|
-
/**
|
|
202
|
-
* Removes one or more nodes starting at the given index
|
|
203
|
-
* and sets {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.
|
|
204
|
-
*
|
|
205
|
-
* @internal
|
|
206
|
-
* @param index Index of the first node to remove.
|
|
207
|
-
* @param howMany Number of nodes to remove.
|
|
208
|
-
* @returns Array containing removed nodes.
|
|
209
|
-
*/
|
|
210
|
-
_removeChildren(index: number, howMany?: number): Array<Node>;
|
|
211
|
-
/**
|
|
212
|
-
* Removes children nodes provided as an array and sets
|
|
213
|
-
* the {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.
|
|
214
|
-
*
|
|
215
|
-
* These nodes do not need to be direct siblings.
|
|
216
|
-
*
|
|
217
|
-
* This method is faster than removing nodes one by one, as it recalculates offsets only once.
|
|
218
|
-
*
|
|
219
|
-
* @internal
|
|
220
|
-
* @param nodes Array of nodes.
|
|
221
|
-
*/
|
|
222
|
-
_removeChildrenArray(nodes: Array<Node>): void;
|
|
223
|
-
}
|