@ckeditor/ckeditor5-engine 47.7.1 → 47.7.2
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/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +48 -36
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/conversion/downcasthelpers.js +2 -1
- package/src/conversion/upcasthelpers.js +1 -1
- package/src/model/element.js +1 -1
- package/src/model/liveposition.js +1 -1
- package/src/model/liverange.js +1 -1
- package/src/model/position.js +4 -2
- package/src/model/rootelement.js +2 -2
- package/src/model/text.js +1 -1
- package/src/model/treewalker.js +4 -2
- package/src/view/attributeelement.js +2 -2
- package/src/view/containerelement.js +4 -3
- package/src/view/domconverter.js +5 -3
- package/src/view/editableelement.js +2 -2
- package/src/view/element.js +1 -1
- package/src/view/emptyelement.js +1 -1
- package/src/view/observer/mutationobserver.js +2 -1
- package/src/view/observer/selectionobserver.js +1 -1
- package/src/view/rawelement.js +1 -1
- package/src/view/renderer.js +8 -5
- package/src/view/rooteditableelement.js +2 -2
- package/src/view/text.js +1 -1
- package/src/view/uielement.js +1 -1
- package/theme/placeholder.css +3 -3
package/dist/index.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/* See ckeditor/ckeditor5
|
|
10
|
+
/* See https://github.com/ckeditor/ckeditor5/issues/936. */
|
|
11
11
|
.ck.ck-placeholder,
|
|
12
12
|
.ck .ck-placeholder {
|
|
13
13
|
position: relative;
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
right: 0;
|
|
19
19
|
content: attr(data-placeholder);
|
|
20
20
|
|
|
21
|
-
/* See ckeditor/ckeditor5
|
|
21
|
+
/* See https://github.com/ckeditor/ckeditor5/issues/469. */
|
|
22
22
|
pointer-events: none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
/* See ckeditor/ckeditor5
|
|
25
|
+
/* See https://github.com/ckeditor/ckeditor5/issues/1987. */
|
|
26
26
|
.ck.ck-read-only .ck-placeholder::before {
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../theme/placeholder.css","index.css","../theme/renderer.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClF,CAAC,CDAC;;AAEF,CAAA,CAAA,CAAA,GAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../theme/placeholder.css","index.css","../theme/renderer.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK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AAA,QAAA,CAAA,EAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAiF;AACjF,CAAA,EAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,IAAA,CAAA,EAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA;ADmCA,CClCC,OAAA,CAAA,CAAA,IAAa;AACd;;ADoCA,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/* See https://github.com/ckeditor/ckeditor5/issues/936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\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\t/* See https://github.com/ckeditor/ckeditor5/issues/469. */\n\t\tpointer-events: none;\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/*\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","/*\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/* See https://github.com/ckeditor/ckeditor5/issues/936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n}\n.ck.ck-placeholder::before, .ck .ck-placeholder::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See https://github.com/ckeditor/ckeditor5/issues/469. */\n\t\tpointer-events: none;\n\t}\n\n/* See https://github.com/ckeditor/ckeditor5/issues/1987. */\n.ck.ck-read-only .ck-placeholder::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\n/*\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\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
|
@@ -594,7 +594,7 @@ ViewNode.prototype.is = function(type) {
|
|
|
594
594
|
// Proper overload would interfere with that.
|
|
595
595
|
ViewText.prototype.is = function(type) {
|
|
596
596
|
return type === '$text' || type === 'view:$text' || // This are legacy values kept for backward compatibility.
|
|
597
|
-
type === 'text' || type === 'view:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
597
|
+
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.
|
|
598
598
|
type === 'node' || type === 'view:node';
|
|
599
599
|
};
|
|
600
600
|
|
|
@@ -3662,7 +3662,7 @@ ViewTextProxy.prototype.is = function(type) {
|
|
|
3662
3662
|
// Proper overload would interfere with that.
|
|
3663
3663
|
ViewElement.prototype.is = function(type, name) {
|
|
3664
3664
|
if (!name) {
|
|
3665
|
-
return type === 'element' || type === 'view:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3665
|
+
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.
|
|
3666
3666
|
type === 'node' || type === 'view:node';
|
|
3667
3667
|
} else {
|
|
3668
3668
|
return name === this.name && (type === 'element' || type === 'view:element');
|
|
@@ -3753,10 +3753,10 @@ ViewElement.prototype.is = function(type, name) {
|
|
|
3753
3753
|
// Proper overload would interfere with that.
|
|
3754
3754
|
ViewContainerElement.prototype.is = function(type, name) {
|
|
3755
3755
|
if (!name) {
|
|
3756
|
-
return type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3756
|
+
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.
|
|
3757
3757
|
type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
3758
3758
|
} else {
|
|
3759
|
-
return name === this.name && (type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3759
|
+
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.
|
|
3760
3760
|
type === 'element' || type === 'view:element');
|
|
3761
3761
|
}
|
|
3762
3762
|
};
|
|
@@ -3769,7 +3769,8 @@ ViewContainerElement.prototype.is = function(type, name) {
|
|
|
3769
3769
|
...this.getChildren()
|
|
3770
3770
|
];
|
|
3771
3771
|
const lastChild = children[this.childCount - 1];
|
|
3772
|
-
// Block filler is required after a `<br>` if it's the last element in its container.
|
|
3772
|
+
// Block filler is required after a `<br>` if it's the last element in its container.
|
|
3773
|
+
// See https://github.com/ckeditor/ckeditor5-engine/issues/1422.
|
|
3773
3774
|
if (lastChild && lastChild.is('element', 'br')) {
|
|
3774
3775
|
return this.childCount;
|
|
3775
3776
|
}
|
|
@@ -3832,10 +3833,10 @@ ViewContainerElement.prototype.is = function(type, name) {
|
|
|
3832
3833
|
// Proper overload would interfere with that.
|
|
3833
3834
|
ViewEditableElement.prototype.is = function(type, name) {
|
|
3834
3835
|
if (!name) {
|
|
3835
|
-
return type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3836
|
+
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.
|
|
3836
3837
|
type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
3837
3838
|
} else {
|
|
3838
|
-
return name === this.name && (type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3839
|
+
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.
|
|
3839
3840
|
type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');
|
|
3840
3841
|
}
|
|
3841
3842
|
};
|
|
@@ -3890,10 +3891,10 @@ const rootNameSymbol = Symbol('rootName');
|
|
|
3890
3891
|
// Proper overload would interfere with that.
|
|
3891
3892
|
ViewRootEditableElement.prototype.is = function(type, name) {
|
|
3892
3893
|
if (!name) {
|
|
3893
|
-
return type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3894
|
+
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.
|
|
3894
3895
|
type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
3895
3896
|
} else {
|
|
3896
|
-
return name === this.name && (type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
3897
|
+
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.
|
|
3897
3898
|
type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');
|
|
3898
3899
|
}
|
|
3899
3900
|
};
|
|
@@ -6286,10 +6287,10 @@ const DEFAULT_PRIORITY = 10;
|
|
|
6286
6287
|
// Proper overload would interfere with that.
|
|
6287
6288
|
ViewAttributeElement.prototype.is = function(type, name) {
|
|
6288
6289
|
if (!name) {
|
|
6289
|
-
return type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
6290
|
+
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.
|
|
6290
6291
|
type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
6291
6292
|
} else {
|
|
6292
|
-
return name === this.name && (type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
6293
|
+
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.
|
|
6293
6294
|
type === 'element' || type === 'view:element');
|
|
6294
6295
|
}
|
|
6295
6296
|
};
|
|
@@ -6377,7 +6378,7 @@ ViewAttributeElement.prototype.is = function(type, name) {
|
|
|
6377
6378
|
// Proper overload would interfere with that.
|
|
6378
6379
|
ViewEmptyElement.prototype.is = function(type, name) {
|
|
6379
6380
|
if (!name) {
|
|
6380
|
-
return type === 'emptyElement' || type === 'view:emptyElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
6381
|
+
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.
|
|
6381
6382
|
type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
6382
6383
|
} else {
|
|
6383
6384
|
return name === this.name && (type === 'emptyElement' || type === 'view:emptyElement' || type === 'element' || type === 'view:element');
|
|
@@ -6492,7 +6493,7 @@ ViewEmptyElement.prototype.is = function(type, name) {
|
|
|
6492
6493
|
// Proper overload would interfere with that.
|
|
6493
6494
|
ViewUIElement.prototype.is = function(type, name) {
|
|
6494
6495
|
if (!name) {
|
|
6495
|
-
return type === 'uiElement' || type === 'view:uiElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
6496
|
+
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.
|
|
6496
6497
|
type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
6497
6498
|
} else {
|
|
6498
6499
|
return name === this.name && (type === 'uiElement' || type === 'view:uiElement' || type === 'element' || type === 'view:element');
|
|
@@ -6648,7 +6649,7 @@ ViewUIElement.prototype.is = function(type, name) {
|
|
|
6648
6649
|
// Proper overload would interfere with that.
|
|
6649
6650
|
ViewRawElement.prototype.is = function(type, name) {
|
|
6650
6651
|
if (!name) {
|
|
6651
|
-
return type === 'rawElement' || type === 'view:rawElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
6652
|
+
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.
|
|
6652
6653
|
type === this.name || type === 'view:' + this.name || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';
|
|
6653
6654
|
} else {
|
|
6654
6655
|
return name === this.name && (type === 'rawElement' || type === 'view:rawElement' || type === 'element' || type === 'view:element');
|
|
@@ -8759,7 +8760,8 @@ const validNodesToInsert = [
|
|
|
8759
8760
|
const insertIndex = counter.equal + counter.insert;
|
|
8760
8761
|
const deleteIndex = counter.equal + counter.delete;
|
|
8761
8762
|
const viewChild = viewElement.getChild(insertIndex);
|
|
8762
|
-
// UIElement and RawElement are special cases. Their children are not stored in a view
|
|
8763
|
+
// UIElement and RawElement are special cases. Their children are not stored in a view.
|
|
8764
|
+
// See https://github.com/ckeditor/ckeditor5/issues/799.
|
|
8763
8765
|
// so we cannot use them with replacing flow (since they use view children during rendering
|
|
8764
8766
|
// which will always result in rendering empty elements).
|
|
8765
8767
|
if (viewChild && !viewChild.is('uiElement') && !viewChild.is('rawElement')) {
|
|
@@ -8787,12 +8789,13 @@ const validNodesToInsert = [
|
|
|
8787
8789
|
// Because we replace new view element mapping with the existing one, the corresponding DOM element
|
|
8788
8790
|
// will not be rerendered. The new view element may have different attributes than the previous one.
|
|
8789
8791
|
// Since its corresponding DOM element will not be rerendered, new attributes will not be added
|
|
8790
|
-
// to the DOM, so we need to mark it here to make sure its attributes gets updated.
|
|
8791
|
-
// detailed case study.
|
|
8792
|
+
// to the DOM, so we need to mark it here to make sure its attributes gets updated.
|
|
8793
|
+
// See https://github.com/ckeditor/ckeditor5-engine/issues/1427 for more detailed case study.
|
|
8792
8794
|
// Also there are cases where replaced element is removed from the view structure and then has
|
|
8793
8795
|
// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`
|
|
8794
8796
|
// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.
|
|
8795
|
-
// To prevent such situations we always mark reused element to have its attributes rerenderd
|
|
8797
|
+
// To prevent such situations we always mark reused element to have its attributes rerenderd.
|
|
8798
|
+
// See https://github.com/ckeditor/ckeditor5-engine/issues/1560.
|
|
8796
8799
|
this.markedAttributes.add(viewElement);
|
|
8797
8800
|
}
|
|
8798
8801
|
/**
|
|
@@ -9079,7 +9082,8 @@ const validNodesToInsert = [
|
|
|
9079
9082
|
this._updateTextNode(actualDomChildren[i], expectedDomChildren[i].data);
|
|
9080
9083
|
i++;
|
|
9081
9084
|
} else if (action === 'equal') {
|
|
9082
|
-
// Force updating text nodes inside elements which did not change and do not need to be re-rendered
|
|
9085
|
+
// Force updating text nodes inside elements which did not change and do not need to be re-rendered.
|
|
9086
|
+
// See https://github.com/ckeditor/ckeditor5-engine/issues/1125.
|
|
9083
9087
|
// Do it here (not in the loop above) because only after insertions the `i` index is correct.
|
|
9084
9088
|
this._markDescendantTextToSync(this.domConverter.domToView(expectedDomChildren[i]));
|
|
9085
9089
|
i++;
|
|
@@ -9890,7 +9894,7 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
|
|
|
9890
9894
|
if (viewElementOrFragment.name === '$comment') {
|
|
9891
9895
|
domElement = this._domDocument.createComment(viewElementOrFragment.getCustomProperty('$rawContent'));
|
|
9892
9896
|
} else {
|
|
9893
|
-
// UIElement has its own render() method (see
|
|
9897
|
+
// UIElement has its own render() method (see https://github.com/ckeditor/ckeditor5/issues/799).
|
|
9894
9898
|
domElement = viewElementOrFragment.render(this._domDocument, this);
|
|
9895
9899
|
}
|
|
9896
9900
|
if (options.bind) {
|
|
@@ -10774,7 +10778,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
|
|
|
10774
10778
|
// Change all consecutive whitespace characters (from the [ \n\t\r] set –
|
|
10775
10779
|
// see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.
|
|
10776
10780
|
// That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.
|
|
10777
|
-
// We're replacing 1+ (and not 2+) to also normalize singular \n\t\r characters
|
|
10781
|
+
// We're replacing 1+ (and not 2+) to also normalize singular \n\t\r characters.
|
|
10782
|
+
// See https://github.com/ckeditor/ckeditor5/issues/822.
|
|
10778
10783
|
data = node.data.replace(/[ \n\t\r]{1,}/g, ' ');
|
|
10779
10784
|
nodeEndsWithSpace = /[^\S\u00A0]/.test(data.charAt(data.length - 1));
|
|
10780
10785
|
const prevNode = i > 0 ? inlineNodes[i - 1] : null;
|
|
@@ -10796,7 +10801,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
|
|
|
10796
10801
|
// At the beginning and end of a block element, Firefox inserts normal space + <br> instead of non-breaking space.
|
|
10797
10802
|
// This means that the text node starts/end with normal space instead of non-breaking space.
|
|
10798
10803
|
// This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,
|
|
10799
|
-
// the inline filler is removed only after the data is initially processed (by the `.replace` above).
|
|
10804
|
+
// the inline filler is removed only after the data is initially processed (by the `.replace` above).
|
|
10805
|
+
// See https://github.com/ckeditor/ckeditor5/issues/692.
|
|
10800
10806
|
data = getDataWithoutFiller(data);
|
|
10801
10807
|
// Block filler handling.
|
|
10802
10808
|
if (this.blockFillerMode != 'br' && node.parent) {
|
|
@@ -11629,7 +11635,8 @@ const UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';
|
|
|
11629
11635
|
});
|
|
11630
11636
|
}
|
|
11631
11637
|
}
|
|
11632
|
-
// In case only non-relevant mutations were recorded it skips the event and force render
|
|
11638
|
+
// In case only non-relevant mutations were recorded it skips the event and force render.
|
|
11639
|
+
// See https://github.com/ckeditor/ckeditor5/issues/5600.
|
|
11633
11640
|
if (mutations.length) {
|
|
11634
11641
|
// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
|
|
11635
11642
|
// @if CK_DEBUG_TYPING // _debouncedLine();
|
|
@@ -12069,7 +12076,7 @@ function sameNodes(child1, child2) {
|
|
|
12069
12076
|
if (this.selection.isEqual(newViewSelection) && this.domConverter.isDomSelectionCorrect(domSelection)) {
|
|
12070
12077
|
return;
|
|
12071
12078
|
}
|
|
12072
|
-
// Ensure we are not in the infinite loop (
|
|
12079
|
+
// Ensure we are not in the infinite loop (https://github.com/ckeditor/ckeditor5-engine/issues/400).
|
|
12073
12080
|
// This counter is reset each second. 60 selection changes in 1 second is enough high number
|
|
12074
12081
|
// to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).
|
|
12075
12082
|
if (++this._loopbackCounter > 60) {
|
|
@@ -13447,7 +13454,8 @@ ModelTextProxy.prototype.is = function(type) {
|
|
|
13447
13454
|
};
|
|
13448
13455
|
}
|
|
13449
13456
|
// Get node just after the current position.
|
|
13450
|
-
// Use a highly optimized version instead of checking the text node first and then getting the node after.
|
|
13457
|
+
// Use a highly optimized version instead of checking the text node first and then getting the node after.
|
|
13458
|
+
// See https://github.com/ckeditor/ckeditor5/issues/6582.
|
|
13451
13459
|
const textNodeAtPosition = getTextNodeAtPosition(position, parent);
|
|
13452
13460
|
const node = textNodeAtPosition || getNodeAfterPosition(position, parent, textNodeAtPosition);
|
|
13453
13461
|
if (node && node.is('model:element')) {
|
|
@@ -13516,7 +13524,8 @@ ModelTextProxy.prototype.is = function(type) {
|
|
|
13516
13524
|
};
|
|
13517
13525
|
}
|
|
13518
13526
|
// Get node just before the current position.
|
|
13519
|
-
// Use a highly optimized version instead of checking the text node first and then getting the node before.
|
|
13527
|
+
// Use a highly optimized version instead of checking the text node first and then getting the node before.
|
|
13528
|
+
// See https://github.com/ckeditor/ckeditor5/issues/6582.
|
|
13520
13529
|
const positionParent = position.parent;
|
|
13521
13530
|
const textNodeAtPosition = getTextNodeAtPosition(position, positionParent);
|
|
13522
13531
|
const node = textNodeAtPosition || getNodeBeforePosition(position, positionParent, textNodeAtPosition);
|
|
@@ -13743,14 +13752,16 @@ function formatReturnValue(type, item, previousPosition, nextPosition, length) {
|
|
|
13743
13752
|
/**
|
|
13744
13753
|
* 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.
|
|
13745
13754
|
*/ get nodeAfter() {
|
|
13746
|
-
// Cache the parent and reuse for performance reasons.
|
|
13755
|
+
// Cache the parent and reuse for performance reasons.
|
|
13756
|
+
// See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.
|
|
13747
13757
|
const parent = this.parent;
|
|
13748
13758
|
return getNodeAfterPosition(this, parent, getTextNodeAtPosition(this, parent));
|
|
13749
13759
|
}
|
|
13750
13760
|
/**
|
|
13751
13761
|
* 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.
|
|
13752
13762
|
*/ get nodeBefore() {
|
|
13753
|
-
// Cache the parent and reuse for performance reasons.
|
|
13763
|
+
// Cache the parent and reuse for performance reasons.
|
|
13764
|
+
// See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.
|
|
13754
13765
|
const parent = this.parent;
|
|
13755
13766
|
return getNodeBeforePosition(this, parent, getTextNodeAtPosition(this, parent));
|
|
13756
13767
|
}
|
|
@@ -18407,7 +18418,7 @@ ModelSelection.prototype.is = function(type) {
|
|
|
18407
18418
|
// The magic of type inference using `is` method is centralized in `TypeCheckable` class.
|
|
18408
18419
|
// Proper overload would interfere with that.
|
|
18409
18420
|
ModelLiveRange.prototype.is = function(type) {
|
|
18410
|
-
return type === 'liveRange' || type === 'model:liveRange' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
18421
|
+
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.
|
|
18411
18422
|
type == 'range' || type === 'model:range';
|
|
18412
18423
|
};
|
|
18413
18424
|
/**
|
|
@@ -18546,7 +18557,7 @@ ModelLiveRange.prototype.is = function(type) {
|
|
|
18546
18557
|
// Proper overload would interfere with that.
|
|
18547
18558
|
ModelText.prototype.is = function(type) {
|
|
18548
18559
|
return type === '$text' || type === 'model:$text' || // This are legacy values kept for backward compatibility.
|
|
18549
|
-
type === 'text' || type === 'model:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
18560
|
+
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.
|
|
18550
18561
|
type === 'node' || type === 'model:node';
|
|
18551
18562
|
};
|
|
18552
18563
|
|
|
@@ -19991,7 +20002,7 @@ ModelDocumentSelection.prototype.is = function(type) {
|
|
|
19991
20002
|
// Proper overload would interfere with that.
|
|
19992
20003
|
ModelElement.prototype.is = function(type, name) {
|
|
19993
20004
|
if (!name) {
|
|
19994
|
-
return type === 'element' || type === 'model:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
20005
|
+
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.
|
|
19995
20006
|
type === 'node' || type === 'model:node';
|
|
19996
20007
|
}
|
|
19997
20008
|
return name === this.name && (type === 'element' || type === 'model:element');
|
|
@@ -21356,7 +21367,8 @@ function cloneNodes(nodes) {
|
|
|
21356
21367
|
const viewElement = conversionApi.mapper.toViewElement(data.item);
|
|
21357
21368
|
const viewWriter = conversionApi.writer;
|
|
21358
21369
|
// If model item cannot be mapped to a view element, it means item is not an `Element` instance but a `ModelTextProxy` node.
|
|
21359
|
-
// Only elements can have attributes in a view so do not proceed for anything else
|
|
21370
|
+
// Only elements can have attributes in a view so do not proceed for anything else.
|
|
21371
|
+
// See https://github.com/ckeditor/ckeditor5-engine/issues/1587.
|
|
21360
21372
|
if (!viewElement) {
|
|
21361
21373
|
/**
|
|
21362
21374
|
* This error occurs when a {@link module:engine/model/textproxy~ModelTextProxy text node's} attribute is to be downcasted
|
|
@@ -23163,7 +23175,7 @@ function getFromAttributeCreator(config) {
|
|
|
23163
23175
|
continue;
|
|
23164
23176
|
}
|
|
23165
23177
|
// Mark the node as consumed even if the attribute will not be updated because it's in a valid context (schema)
|
|
23166
|
-
// and would be converted if the attribute wouldn't be present. See
|
|
23178
|
+
// and would be converted if the attribute wouldn't be present. See https://github.com/ckeditor/ckeditor5/issues/8921.
|
|
23167
23179
|
result = true;
|
|
23168
23180
|
// Do not override the attribute if it's already present.
|
|
23169
23181
|
if (node.hasAttribute(modelAttribute.key)) {
|
|
@@ -30465,7 +30477,7 @@ setTransformation(SplitOperation, SplitOperation, (a, b, context)=>{
|
|
|
30465
30477
|
// The magic of type inference using `is` method is centralized in `TypeCheckable` class.
|
|
30466
30478
|
// Proper overload would interfere with that.
|
|
30467
30479
|
ModelLivePosition.prototype.is = function(type) {
|
|
30468
|
-
return type === 'livePosition' || type === 'model:livePosition' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
30480
|
+
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.
|
|
30469
30481
|
type == 'position' || type === 'model:position';
|
|
30470
30482
|
};
|
|
30471
30483
|
/**
|
|
@@ -32066,10 +32078,10 @@ ModelLivePosition.prototype.is = function(type) {
|
|
|
32066
32078
|
// Proper overload would interfere with that.
|
|
32067
32079
|
ModelRootElement.prototype.is = function(type, name) {
|
|
32068
32080
|
if (!name) {
|
|
32069
|
-
return type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
32081
|
+
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.
|
|
32070
32082
|
type === 'element' || type === 'model:element' || type === 'node' || type === 'model:node';
|
|
32071
32083
|
}
|
|
32072
|
-
return name === this.name && (type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5
|
|
32084
|
+
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.
|
|
32073
32085
|
type === 'element' || type === 'model:element');
|
|
32074
32086
|
};
|
|
32075
32087
|
|