@ckeditor/ckeditor5-engine 48.1.1 → 48.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.
@@ -98,6 +98,12 @@ export declare class ModelDocument extends /* #__PURE__ */ ModelDocument_base {
98
98
  * **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use
99
99
  * {@link module:engine/model/writer~ModelWriter#addRoot `model.Writer#addRoot`} instead.
100
100
  *
101
+ * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root
102
+ * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element
103
+ * name explicitly so the created root matches the schema the features expect.
104
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
105
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
106
+ *
101
107
  * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined
102
108
  * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.
103
109
  * @param rootName A unique root name.
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { Operation } from './operation.js';
9
9
  import { ModelPosition } from '../position.js';
10
+ import { ModelRange } from '../range.js';
10
11
  import type { ModelSelectable } from '../selection.js';
11
12
  import { type ModelDocument } from '../document.js';
12
13
  /**
@@ -45,6 +46,11 @@ export declare class MoveOperation extends Operation {
45
46
  * @inheritDoc
46
47
  */
47
48
  get affectedSelectable(): ModelSelectable;
49
+ /**
50
+ * Returns the range that is moved by this operation. This is equal to a range starting at {@link #sourcePosition} spanning over
51
+ * {@link #howMany} nodes.
52
+ */
53
+ get sourceRange(): ModelRange;
48
54
  /**
49
55
  * Creates and returns an operation that has the same parameters as this operation.
50
56
  */
@@ -630,6 +630,12 @@ export declare class ModelWriter {
630
630
  *
631
631
  * Throws an error, if trying to add a root that is already added and attached.
632
632
  *
633
+ * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root
634
+ * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element
635
+ * name explicitly so the added root matches the schema the features expect.
636
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
637
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
638
+ *
633
639
  * @param rootName Name of the added root.
634
640
  * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined
635
641
  * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.
@@ -12,6 +12,7 @@ import { ViewPosition, type ViewPositionOffset } from './position.js';
12
12
  import { ViewRange } from './range.js';
13
13
  import { ViewSelection, type ViewPlaceOrOffset, type ViewSelectable, type ViewSelectionOptions } from './selection.js';
14
14
  import type { Observer, ObserverConstructor } from './observer/observer.js';
15
+ import type { ViewDocumentFragment } from './documentfragment.js';
15
16
  import type { StylesProcessor } from './stylesmap.js';
16
17
  import { type ViewElement } from './element.js';
17
18
  import type { ViewNode } from './node.js';
@@ -313,7 +314,7 @@ export declare class EditingView extends /* #__PURE__ */ EditingView_base {
313
314
  *
314
315
  * @param element Element which is a parent for the range.
315
316
  */
316
- createRangeIn(element: ViewElement): ViewRange;
317
+ createRangeIn(element: ViewElement | ViewDocumentFragment): ViewRange;
317
318
  /**
318
319
  * Creates new {@link module:engine/view/selection~ViewSelection} instance.
319
320
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-engine",
3
- "version": "48.1.1",
3
+ "version": "48.2.0-alpha.0",
4
4
  "description": "The editing engine of CKEditor 5 – the best browser-based rich text editor.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -37,7 +37,7 @@
37
37
  "./package.json": "./package.json"
38
38
  },
39
39
  "dependencies": {
40
- "@ckeditor/ckeditor5-utils": "48.1.1",
40
+ "@ckeditor/ckeditor5-utils": "48.2.0-alpha.0",
41
41
  "es-toolkit": "1.45.1"
42
42
  },
43
43
  "files": [