@ckeditor/ckeditor5-engine 48.1.0 → 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.
@@ -200,6 +200,13 @@ export declare class DataController extends /* #__PURE__ */ DataController_base
200
200
  * Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters
201
201
  * attached to the {@link #upcastDispatcher}.
202
202
  *
203
+ * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a
204
+ * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
205
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
206
+ * explicitly, otherwise the conversion result may be wrong.
207
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
208
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
209
+ *
203
210
  * @see #set
204
211
  * @param data Data to parse.
205
212
  * @param context Base context in which the view will be converted to the model.
@@ -215,6 +222,13 @@ export declare class DataController extends /* #__PURE__ */ DataController_base
215
222
  * When marker elements were converted during the conversion process, it will be set as a document fragment's
216
223
  * {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.
217
224
  *
225
+ * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a
226
+ * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
227
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
228
+ * explicitly, otherwise the conversion result may be wrong.
229
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
230
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
231
+ *
218
232
  * @fires toModel
219
233
  * @param viewElementOrFragment The element or document fragment whose content will be converted.
220
234
  * @param context Base context in which the view will be converted to the model.
@@ -157,6 +157,13 @@ export declare class UpcastDispatcher extends /* #__PURE__ */ UpcastDispatcher_b
157
157
  /**
158
158
  * Starts the conversion process. The entry point for the conversion.
159
159
  *
160
+ * **Note:** The default `context` value is `[ '$root' ]`, which only matches the generic root. When the editor uses
161
+ * a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
162
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
163
+ * explicitly, otherwise the conversion result may be wrong.
164
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
165
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
166
+ *
160
167
  * @fires element
161
168
  * @fires text
162
169
  * @fires documentFragment
@@ -105,6 +105,13 @@ export declare function _stringifyModel(node: ModelNode | ModelDocumentFragment,
105
105
  * <$text attribute="value">Text data</$text>
106
106
  * ```
107
107
  *
108
+ * **Note:** The default `options.context` value is `'$root'`, which only matches the generic root. When the editor
109
+ * uses a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
110
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
111
+ * explicitly, otherwise the conversion result may be wrong.
112
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
113
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
114
+ *
108
115
  * @param data HTML-like string to be parsed.
109
116
  * @param schema A schema instance used by converters for element validation.
110
117
  * @param options Additional configuration.
@@ -16,9 +16,14 @@
16
16
  content:attr(data-placeholder);
17
17
  cursor:text;
18
18
  pointer-events:none;
19
+ padding-left:inherit;
20
+ padding-right:inherit;
21
+ white-space:nowrap;
22
+ text-overflow:ellipsis;
19
23
  position:absolute;
20
24
  left:0;
21
25
  right:0;
26
+ overflow:hidden;
22
27
  }
23
28
 
24
29
  @media (forced-colors: none){
package/dist/index.css CHANGED
@@ -16,9 +16,14 @@
16
16
  content: attr(data-placeholder);
17
17
  cursor: text;
18
18
  pointer-events: none;
19
+ padding-left: inherit;
20
+ padding-right: inherit;
21
+ white-space: nowrap;
22
+ text-overflow: ellipsis;
19
23
  position: absolute;
20
24
  left: 0;
21
25
  right: 0;
26
+ overflow: hidden;
22
27
  }
23
28
 
24
29
  @media (forced-colors: none) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../theme/placeholder.css","index.css","../theme/renderer.css"],"names":[],"mappings":";;;;AAMA,CAAA,EAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA;ACLA,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ;AACpB;;ADOC,CAAA,KAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,CAAA,MAAA,CAAA,CAAA;ACJD,CAAC,CDIgC,CAAA,EAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA;ACHjC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK;AAC9C,CAAC,CAAC;AACF;;ADSC,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,MAAA,CAAA;ACND,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;AACjC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI;AACd,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI;AACtB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ;AACpB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACT,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACV;;ADWE,CAAA,KAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,CAAA,IAAA,CAAA,CAAA;ACRF,CAAC,CDQ+B,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,MAAA,CAAA;ACPhC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;AAClD,CAAC,CAAC;AACF;;ADSE,CAAA,KAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,CAAA,MAAA,CAAA,CAAA;ACNF,CAAC,CDMiC,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,MAAA,CAAA;ACLlC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG;AACpB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM;AACtB,CAAC,CAAC;AACF;;ADoBC,CAAA,EAAA,CAAA,EAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA,MAAA,CAAA;ACjBD,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI;AACf;;ADyBA,CAAA,EAAA,CAAA,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA;ACtBA,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ;AACpB;;AChCA,CAAA,EAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,IAAA,CAAA,EAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA;ADmCA,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI;AACf;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n\n.ck.ck-placeholder, .ck .ck-placeholder {\n\tposition: relative;\n\n\t@media (forced-colors: active) {\n\t\t/*\n\t\t * This is needed for Edge on Windows to use the right color for the placeholder content (::before).\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t */\n\t\tforced-color-adjust: preserve-parent-color;\n\t}\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\tcursor: text;\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\n\t\t@media (forced-colors: none) {\n\t\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t\t}\n\n\t\t@media (forced-colors: active) {\n\t\t\t/*\n\t\t\t * In the high contrast mode there is no telling between regular and placeholder text. Using\n\t\t\t * italic text to address that issue. See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tfont-style: italic;\n\n\t\t\t/*\n\t\t\t * Without this margin, the caret will not show up and blink when the user puts the selection\n\t\t\t * in the placeholder (Edge on Windows). See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tmargin-left: 1px;\n\t\t}\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n",".ck.ck-placeholder, .ck .ck-placeholder {\n position: relative;\n}\n\n@media (forced-colors: active) {\n .ck.ck-placeholder, .ck .ck-placeholder {\n forced-color-adjust: preserve-parent-color;\n }\n}\n\n:is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n content: attr(data-placeholder);\n cursor: text;\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n}\n\n@media (forced-colors: none) {\n :is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n color: var(--ck-color-engine-placeholder-text);\n }\n}\n\n@media (forced-colors: active) {\n :is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n margin-left: 1px;\n font-style: italic;\n }\n}\n\n.ck.ck-read-only .ck-placeholder:before {\n display: none;\n}\n\n.ck.ck-reset_all .ck-placeholder {\n position: relative;\n}\n\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n display: none;\n}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"]}
1
+ {"version":3,"sources":["../theme/placeholder.css","index.css","../theme/renderer.css"],"names":[],"mappings":"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","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n\n.ck.ck-placeholder, .ck .ck-placeholder {\n\tposition: relative;\n\n\t@media (forced-colors: active) {\n\t\t/*\n\t\t * This is needed for Edge on Windows to use the right color for the placeholder content (::before).\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t */\n\t\tforced-color-adjust: preserve-parent-color;\n\t}\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\tcursor: text;\n\n\t\t/* See https://github.com/ckeditor/ckeditor5/issues/469. */\n\t\tpointer-events: none;\n\n\t\t/*\n\t\t * Inherit the content styles padding of the placeholder host.\n\t\t * This ensures the placeholder stays at the padding just like the native caret does, and not at the edge of editable.\n\t\t */\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\n\t\t@media (forced-colors: none) {\n\t\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t\t}\n\n\t\t@media (forced-colors: active) {\n\t\t\t/*\n\t\t\t * In the high contrast mode there is no telling between regular and placeholder text. Using\n\t\t\t * italic text to address that issue. See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tfont-style: italic;\n\n\t\t\t/*\n\t\t\t * Without this margin, the caret will not show up and blink when the user puts the selection\n\t\t\t * in the placeholder (Edge on Windows). See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tmargin-left: 1px;\n\t\t}\n\t}\n}\n\n/* See https://github.com/ckeditor/ckeditor5/issues/1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n",".ck.ck-placeholder, .ck .ck-placeholder {\n position: relative;\n}\n\n@media (forced-colors: active) {\n .ck.ck-placeholder, .ck .ck-placeholder {\n forced-color-adjust: preserve-parent-color;\n }\n}\n\n:is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n content: attr(data-placeholder);\n cursor: text;\n pointer-events: none;\n padding-left: inherit;\n padding-right: inherit;\n white-space: nowrap;\n text-overflow: ellipsis;\n position: absolute;\n left: 0;\n right: 0;\n overflow: hidden;\n}\n\n@media (forced-colors: none) {\n :is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n color: var(--ck-color-engine-placeholder-text);\n }\n}\n\n@media (forced-colors: active) {\n :is(.ck.ck-placeholder, .ck .ck-placeholder):before {\n margin-left: 1px;\n font-style: italic;\n }\n}\n\n.ck.ck-read-only .ck-placeholder:before {\n display: none;\n}\n\n.ck.ck-reset_all .ck-placeholder {\n position: relative;\n}\n\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n display: none;\n}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"]}
package/dist/index.js CHANGED
@@ -595,7 +595,7 @@ ViewNode.prototype.is = function(type) {
595
595
  // Proper overload would interfere with that.
596
596
  ViewText.prototype.is = function(type) {
597
597
  return type === '$text' || type === 'view:$text' || // This are legacy values kept for backward compatibility.
598
- type === 'text' || type === 'view:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
598
+ type === 'text' || type === 'view:text' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
599
599
  type === 'node' || type === 'view:node';
600
600
  };
601
601
 
@@ -3667,7 +3667,7 @@ ViewTextProxy.prototype.is = function(type) {
3667
3667
  // Proper overload would interfere with that.
3668
3668
  ViewElement.prototype.is = function(type, name) {
3669
3669
  if (!name) {
3670
- return type === 'element' || type === 'view:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3670
+ return type === 'element' || type === 'view:element' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3671
3671
  type === 'node' || type === 'view:node';
3672
3672
  } else {
3673
3673
  return name === this.name && (type === 'element' || type === 'view:element');
@@ -3758,10 +3758,10 @@ ViewElement.prototype.is = function(type, name) {
3758
3758
  // Proper overload would interfere with that.
3759
3759
  ViewContainerElement.prototype.is = function(type, name) {
3760
3760
  if (!name) {
3761
- return type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3761
+ return type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3762
3762
  type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
3763
3763
  } else {
3764
- return name === this.name && (type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3764
+ return name === this.name && (type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3765
3765
  type === 'element' || type === 'view:element');
3766
3766
  }
3767
3767
  };
@@ -3774,7 +3774,8 @@ ViewContainerElement.prototype.is = function(type, name) {
3774
3774
  ...this.getChildren()
3775
3775
  ];
3776
3776
  let lastChild = children[this.childCount - 1];
3777
- // Block filler is required after a `<br>` if it's the last element in its container. See #1422.
3777
+ // Block filler is required after a `<br>` if it's the last element in its container.
3778
+ // See https://github.com/ckeditor/ckeditor5-engine/issues/1422.
3778
3779
  if (lastChild && lastChild.is('element', 'br')) {
3779
3780
  return this.childCount;
3780
3781
  }
@@ -3844,10 +3845,10 @@ ViewContainerElement.prototype.is = function(type, name) {
3844
3845
  // Proper overload would interfere with that.
3845
3846
  ViewEditableElement.prototype.is = function(type, name) {
3846
3847
  if (!name) {
3847
- return type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3848
+ return type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3848
3849
  type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
3849
3850
  } else {
3850
- return name === this.name && (type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3851
+ return name === this.name && (type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3851
3852
  type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');
3852
3853
  }
3853
3854
  };
@@ -3902,10 +3903,10 @@ const rootNameSymbol = Symbol('rootName');
3902
3903
  // Proper overload would interfere with that.
3903
3904
  ViewRootEditableElement.prototype.is = function(type, name) {
3904
3905
  if (!name) {
3905
- return type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3906
+ return type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3906
3907
  type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
3907
3908
  } else {
3908
- return name === this.name && (type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
3909
+ return name === this.name && (type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
3909
3910
  type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');
3910
3911
  }
3911
3912
  };
@@ -6303,10 +6304,10 @@ const DEFAULT_PRIORITY = 10;
6303
6304
  // Proper overload would interfere with that.
6304
6305
  ViewAttributeElement.prototype.is = function(type, name) {
6305
6306
  if (!name) {
6306
- return type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
6307
+ return type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
6307
6308
  type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
6308
6309
  } else {
6309
- return name === this.name && (type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
6310
+ return name === this.name && (type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
6310
6311
  type === 'element' || type === 'view:element');
6311
6312
  }
6312
6313
  };
@@ -6394,7 +6395,7 @@ ViewAttributeElement.prototype.is = function(type, name) {
6394
6395
  // Proper overload would interfere with that.
6395
6396
  ViewEmptyElement.prototype.is = function(type, name) {
6396
6397
  if (!name) {
6397
- return type === 'emptyElement' || type === 'view:emptyElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
6398
+ return type === 'emptyElement' || type === 'view:emptyElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
6398
6399
  type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
6399
6400
  } else {
6400
6401
  return name === this.name && (type === 'emptyElement' || type === 'view:emptyElement' || type === 'element' || type === 'view:element');
@@ -6509,7 +6510,7 @@ ViewEmptyElement.prototype.is = function(type, name) {
6509
6510
  // Proper overload would interfere with that.
6510
6511
  ViewUIElement.prototype.is = function(type, name) {
6511
6512
  if (!name) {
6512
- return type === 'uiElement' || type === 'view:uiElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
6513
+ return type === 'uiElement' || type === 'view:uiElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
6513
6514
  type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
6514
6515
  } else {
6515
6516
  return name === this.name && (type === 'uiElement' || type === 'view:uiElement' || type === 'element' || type === 'view:element');
@@ -6665,7 +6666,7 @@ ViewUIElement.prototype.is = function(type, name) {
6665
6666
  // Proper overload would interfere with that.
6666
6667
  ViewRawElement.prototype.is = function(type, name) {
6667
6668
  if (!name) {
6668
- return type === 'rawElement' || type === 'view:rawElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
6669
+ return type === 'rawElement' || type === 'view:rawElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
6669
6670
  type === this.name || type === 'view:' + this.name || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
6670
6671
  } else {
6671
6672
  return name === this.name && (type === 'rawElement' || type === 'view:rawElement' || type === 'element' || type === 'view:element');
@@ -8749,7 +8750,8 @@ const validNodesToInsert = [
8749
8750
  const insertIndex = counter.equal + counter.insert;
8750
8751
  const deleteIndex = counter.equal + counter.delete;
8751
8752
  const viewChild = viewElement.getChild(insertIndex);
8752
- // UIElement and RawElement are special cases. Their children are not stored in a view (#799)
8753
+ // UIElement and RawElement are special cases. Their children are not stored in a view.
8754
+ // See https://github.com/ckeditor/ckeditor5/issues/799.
8753
8755
  // so we cannot use them with replacing flow (since they use view children during rendering
8754
8756
  // which will always result in rendering empty elements).
8755
8757
  if (viewChild && !viewChild.is('uiElement') && !viewChild.is('rawElement')) {
@@ -8777,12 +8779,13 @@ const validNodesToInsert = [
8777
8779
  // Because we replace new view element mapping with the existing one, the corresponding DOM element
8778
8780
  // will not be rerendered. The new view element may have different attributes than the previous one.
8779
8781
  // Since its corresponding DOM element will not be rerendered, new attributes will not be added
8780
- // to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more
8781
- // detailed case study.
8782
+ // to the DOM, so we need to mark it here to make sure its attributes gets updated.
8783
+ // See https://github.com/ckeditor/ckeditor5-engine/issues/1427 for more detailed case study.
8782
8784
  // Also there are cases where replaced element is removed from the view structure and then has
8783
8785
  // its attributes changed or removed. In such cases the element will not be present in `markedAttributes`
8784
8786
  // and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.
8785
- // To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).
8787
+ // To prevent such situations we always mark reused element to have its attributes rerenderd.
8788
+ // See https://github.com/ckeditor/ckeditor5-engine/issues/1560.
8786
8789
  this.markedAttributes.add(viewElement);
8787
8790
  }
8788
8791
  /**
@@ -9069,7 +9072,8 @@ const validNodesToInsert = [
9069
9072
  this._updateTextNode(actualDomChildren[i], expectedDomChildren[i].data);
9070
9073
  i++;
9071
9074
  } else if (action === 'equal') {
9072
- // Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).
9075
+ // Force updating text nodes inside elements which did not change and do not need to be re-rendered.
9076
+ // See https://github.com/ckeditor/ckeditor5-engine/issues/1125.
9073
9077
  // Do it here (not in the loop above) because only after insertions the `i` index is correct.
9074
9078
  this._markDescendantTextToSync(this.domConverter.domToView(expectedDomChildren[i]));
9075
9079
  i++;
@@ -9880,7 +9884,7 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
9880
9884
  if (viewElementOrFragment.name === '$comment') {
9881
9885
  domElement = this._domDocument.createComment(viewElementOrFragment.getCustomProperty('$rawContent'));
9882
9886
  } else {
9883
- // UIElement has its own render() method (see #799).
9887
+ // UIElement has its own render() method (see https://github.com/ckeditor/ckeditor5/issues/799).
9884
9888
  domElement = viewElementOrFragment.render(this._domDocument, this);
9885
9889
  }
9886
9890
  if (options.bind) {
@@ -10764,7 +10768,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
10764
10768
  // Change all consecutive whitespace characters (from the [ \n\t\r] set –
10765
10769
  // see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.
10766
10770
  // That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.
10767
- // We're replacing 1+ (and not 2+) to also normalize singular \n\t\r characters (#822).
10771
+ // We're replacing 1+ (and not 2+) to also normalize singular \n\t\r characters.
10772
+ // See https://github.com/ckeditor/ckeditor5/issues/822.
10768
10773
  data = node.data.replace(/[ \n\t\r]{1,}/g, ' ');
10769
10774
  nodeEndsWithSpace = /[^\S\u00A0]/.test(data.charAt(data.length - 1));
10770
10775
  const prevNode = i > 0 ? inlineNodes[i - 1] : null;
@@ -10786,7 +10791,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
10786
10791
  // At the beginning and end of a block element, Firefox inserts normal space + <br> instead of non-breaking space.
10787
10792
  // This means that the text node starts/end with normal space instead of non-breaking space.
10788
10793
  // This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,
10789
- // the inline filler is removed only after the data is initially processed (by the `.replace` above). See ckeditor5#692.
10794
+ // the inline filler is removed only after the data is initially processed (by the `.replace` above).
10795
+ // See https://github.com/ckeditor/ckeditor5/issues/692.
10790
10796
  data = getDataWithoutFiller(data);
10791
10797
  // Block filler handling.
10792
10798
  if (this.blockFillerMode != 'br' && node.parent) {
@@ -11619,7 +11625,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
11619
11625
  });
11620
11626
  }
11621
11627
  }
11622
- // In case only non-relevant mutations were recorded it skips the event and force render (#5600).
11628
+ // In case only non-relevant mutations were recorded it skips the event and force render.
11629
+ // See https://github.com/ckeditor/ckeditor5/issues/5600.
11623
11630
  if (mutations.length) {
11624
11631
  // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
11625
11632
  // @if CK_DEBUG_TYPING // _debouncedLine();
@@ -12059,7 +12066,7 @@ function sameNodes(child1, child2) {
12059
12066
  if (this.selection.isEqual(newViewSelection) && this.domConverter.isDomSelectionCorrect(domSelection)) {
12060
12067
  return;
12061
12068
  }
12062
- // Ensure we are not in the infinite loop (#400).
12069
+ // Ensure we are not in the infinite loop (https://github.com/ckeditor/ckeditor5-engine/issues/400).
12063
12070
  // This counter is reset each second. 60 selection changes in 1 second is enough high number
12064
12071
  // to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).
12065
12072
  if (++this._loopbackCounter > 60) {
@@ -13437,7 +13444,8 @@ ModelTextProxy.prototype.is = function(type) {
13437
13444
  };
13438
13445
  }
13439
13446
  // Get node just after the current position.
13440
- // Use a highly optimized version instead of checking the text node first and then getting the node after. See #6582.
13447
+ // Use a highly optimized version instead of checking the text node first and then getting the node after.
13448
+ // See https://github.com/ckeditor/ckeditor5/issues/6582.
13441
13449
  const textNodeAtPosition = getTextNodeAtPosition(position, parent);
13442
13450
  const node = textNodeAtPosition || getNodeAfterPosition(position, parent, textNodeAtPosition);
13443
13451
  if (node && node.is('model:element')) {
@@ -13506,7 +13514,8 @@ ModelTextProxy.prototype.is = function(type) {
13506
13514
  };
13507
13515
  }
13508
13516
  // Get node just before the current position.
13509
- // Use a highly optimized version instead of checking the text node first and then getting the node before. See #6582.
13517
+ // Use a highly optimized version instead of checking the text node first and then getting the node before.
13518
+ // See https://github.com/ckeditor/ckeditor5/issues/6582.
13510
13519
  const positionParent = position.parent;
13511
13520
  const textNodeAtPosition = getTextNodeAtPosition(position, positionParent);
13512
13521
  const node = textNodeAtPosition || getNodeBeforePosition(position, positionParent, textNodeAtPosition);
@@ -13733,14 +13742,16 @@ function formatReturnValue(type, item, previousPosition, nextPosition, length) {
13733
13742
  /**
13734
13743
  * Node directly after this position. Returns `null` if this position is at the end of its parent, or if it is in a text node.
13735
13744
  */ get nodeAfter() {
13736
- // Cache the parent and reuse for performance reasons. See #6579 and #6582.
13745
+ // Cache the parent and reuse for performance reasons.
13746
+ // See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.
13737
13747
  const parent = this.parent;
13738
13748
  return getNodeAfterPosition(this, parent, getTextNodeAtPosition(this, parent));
13739
13749
  }
13740
13750
  /**
13741
13751
  * Node directly before this position. Returns `null` if this position is at the start of its parent, or if it is in a text node.
13742
13752
  */ get nodeBefore() {
13743
- // Cache the parent and reuse for performance reasons. See #6579 and #6582.
13753
+ // Cache the parent and reuse for performance reasons.
13754
+ // See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.
13744
13755
  const parent = this.parent;
13745
13756
  return getNodeBeforePosition(this, parent, getTextNodeAtPosition(this, parent));
13746
13757
  }
@@ -18491,7 +18502,7 @@ ModelSelection.prototype.is = function(type) {
18491
18502
  // The magic of type inference using `is` method is centralized in `TypeCheckable` class.
18492
18503
  // Proper overload would interfere with that.
18493
18504
  ModelLiveRange.prototype.is = function(type) {
18494
- return type === 'liveRange' || type === 'model:liveRange' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
18505
+ return type === 'liveRange' || type === 'model:liveRange' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
18495
18506
  type == 'range' || type === 'model:range';
18496
18507
  };
18497
18508
  /**
@@ -18630,7 +18641,7 @@ ModelLiveRange.prototype.is = function(type) {
18630
18641
  // Proper overload would interfere with that.
18631
18642
  ModelText.prototype.is = function(type) {
18632
18643
  return type === '$text' || type === 'model:$text' || // This are legacy values kept for backward compatibility.
18633
- type === 'text' || type === 'model:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
18644
+ type === 'text' || type === 'model:text' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
18634
18645
  type === 'node' || type === 'model:node';
18635
18646
  };
18636
18647
 
@@ -20084,7 +20095,7 @@ ModelDocumentSelection.prototype.is = function(type) {
20084
20095
  // Proper overload would interfere with that.
20085
20096
  ModelElement.prototype.is = function(type, name) {
20086
20097
  if (!name) {
20087
- return type === 'element' || type === 'model:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
20098
+ return type === 'element' || type === 'model:element' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
20088
20099
  type === 'node' || type === 'model:node';
20089
20100
  }
20090
20101
  return name === this.name && (type === 'element' || type === 'model:element');
@@ -21453,7 +21464,8 @@ function cloneNodes(nodes) {
21453
21464
  const viewElement = conversionApi.mapper.toViewElement(data.item);
21454
21465
  const viewWriter = conversionApi.writer;
21455
21466
  // If model item cannot be mapped to a view element, it means item is not an `Element` instance but a `ModelTextProxy` node.
21456
- // Only elements can have attributes in a view so do not proceed for anything else (#1587).
21467
+ // Only elements can have attributes in a view so do not proceed for anything else.
21468
+ // See https://github.com/ckeditor/ckeditor5-engine/issues/1587.
21457
21469
  if (!viewElement) {
21458
21470
  /**
21459
21471
  * This error occurs when a {@link module:engine/model/textproxy~ModelTextProxy text node's} attribute is to be downcasted
@@ -23255,7 +23267,7 @@ function getFromAttributeCreator(config) {
23255
23267
  continue;
23256
23268
  }
23257
23269
  // Mark the node as consumed even if the attribute will not be updated because it's in a valid context (schema)
23258
- // and would be converted if the attribute wouldn't be present. See #8921.
23270
+ // and would be converted if the attribute wouldn't be present. See https://github.com/ckeditor/ckeditor5/issues/8921.
23259
23271
  result = true;
23260
23272
  // Do not override the attribute if it's already present.
23261
23273
  if (node.hasAttribute(modelAttribute.key)) {
@@ -25095,6 +25107,13 @@ function removeDisallowedAttributeFromNode(schema, node, writer) {
25095
25107
  /**
25096
25108
  * Starts the conversion process. The entry point for the conversion.
25097
25109
  *
25110
+ * **Note:** The default `context` value is `[ '$root' ]`, which only matches the generic root. When the editor uses
25111
+ * a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
25112
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
25113
+ * explicitly, otherwise the conversion result may be wrong.
25114
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
25115
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
25116
+ *
25098
25117
  * @fires element
25099
25118
  * @fires text
25100
25119
  * @fires documentFragment
@@ -25854,6 +25873,13 @@ function removeDisallowedAttributeFromNode(schema, node, writer) {
25854
25873
  * Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters
25855
25874
  * attached to the {@link #upcastDispatcher}.
25856
25875
  *
25876
+ * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a
25877
+ * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
25878
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
25879
+ * explicitly, otherwise the conversion result may be wrong.
25880
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
25881
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
25882
+ *
25857
25883
  * @see #set
25858
25884
  * @param data Data to parse.
25859
25885
  * @param context Base context in which the view will be converted to the model.
@@ -25873,6 +25899,13 @@ function removeDisallowedAttributeFromNode(schema, node, writer) {
25873
25899
  * When marker elements were converted during the conversion process, it will be set as a document fragment's
25874
25900
  * {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.
25875
25901
  *
25902
+ * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a
25903
+ * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
25904
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
25905
+ * explicitly, otherwise the conversion result may be wrong.
25906
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
25907
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
25908
+ *
25876
25909
  * @fires toModel
25877
25910
  * @param viewElementOrFragment The element or document fragment whose content will be converted.
25878
25911
  * @param context Base context in which the view will be converted to the model.
@@ -26987,10 +27020,16 @@ function* _getUpcastDefinition(model, view, upcastAlso) {
26987
27020
  * @inheritDoc
26988
27021
  */ get affectedSelectable() {
26989
27022
  return [
26990
- ModelRange._createFromPositionAndShift(this.sourcePosition, this.howMany),
27023
+ this.sourceRange,
26991
27024
  ModelRange._createFromPositionAndShift(this.targetPosition, 0)
26992
27025
  ];
26993
27026
  }
27027
+ /**
27028
+ * Returns the range that is moved by this operation. This is equal to a range starting at {@link #sourcePosition} spanning over
27029
+ * {@link #howMany} nodes.
27030
+ */ get sourceRange() {
27031
+ return ModelRange._createFromPositionAndShift(this.sourcePosition, this.howMany);
27032
+ }
26994
27033
  /**
26995
27034
  * Creates and returns an operation that has the same parameters as this operation.
26996
27035
  */ clone() {
@@ -27058,7 +27097,7 @@ function* _getUpcastDefinition(model, view, upcastAlso) {
27058
27097
  * @inheritDoc
27059
27098
  * @internal
27060
27099
  */ _execute() {
27061
- _move(ModelRange._createFromPositionAndShift(this.sourcePosition, this.howMany), this.targetPosition);
27100
+ _move(this.sourceRange, this.targetPosition);
27062
27101
  }
27063
27102
  /**
27064
27103
  * @inheritDoc
@@ -30518,7 +30557,7 @@ setTransformation(SplitOperation, SplitOperation, (a, b, context)=>{
30518
30557
  // The magic of type inference using `is` method is centralized in `TypeCheckable` class.
30519
30558
  // Proper overload would interfere with that.
30520
30559
  ModelLivePosition.prototype.is = function(type) {
30521
- return type === 'livePosition' || type === 'model:livePosition' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
30560
+ return type === 'livePosition' || type === 'model:livePosition' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
30522
30561
  type == 'position' || type === 'model:position';
30523
30562
  };
30524
30563
  /**
@@ -32117,10 +32156,10 @@ ModelLivePosition.prototype.is = function(type) {
32117
32156
  // Proper overload would interfere with that.
32118
32157
  ModelRootElement.prototype.is = function(type, name) {
32119
32158
  if (!name) {
32120
- return type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
32159
+ return type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
32121
32160
  type === 'element' || type === 'model:element' || type === 'node' || type === 'model:node';
32122
32161
  }
32123
- return name === this.name && (type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
32162
+ return name === this.name && (type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.
32124
32163
  type === 'element' || type === 'model:element');
32125
32164
  };
32126
32165
 
@@ -32285,6 +32324,12 @@ const graveyardName = '$graveyard';
32285
32324
  * **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use
32286
32325
  * {@link module:engine/model/writer~ModelWriter#addRoot `model.Writer#addRoot`} instead.
32287
32326
  *
32327
+ * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root
32328
+ * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element
32329
+ * name explicitly so the created root matches the schema the features expect.
32330
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
32331
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
32332
+ *
32288
32333
  * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined
32289
32334
  * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.
32290
32335
  * @param rootName A unique root name.
@@ -34103,6 +34148,12 @@ ModelDocumentFragment.prototype.is = function(type) {
34103
34148
  *
34104
34149
  * Throws an error, if trying to add a root that is already added and attached.
34105
34150
  *
34151
+ * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root
34152
+ * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element
34153
+ * name explicitly so the added root matches the schema the features expect.
34154
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
34155
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
34156
+ *
34106
34157
  * @param rootName Name of the added root.
34107
34158
  * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined
34108
34159
  * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.
@@ -40229,6 +40280,13 @@ _setModelData._parse = _parseModel;
40229
40280
  * <$text attribute="value">Text data</$text>
40230
40281
  * ```
40231
40282
  *
40283
+ * **Note:** The default `options.context` value is `'$root'`, which only matches the generic root. When the editor
40284
+ * uses a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target
40285
+ * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)
40286
+ * explicitly, otherwise the conversion result may be wrong.
40287
+ * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the
40288
+ * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.
40289
+ *
40232
40290
  * @param data HTML-like string to be parsed.
40233
40291
  * @param schema A schema instance used by converters for element validation.
40234
40292
  * @param options Additional configuration.