@ckeditor/ckeditor5-list 48.5.2 → 48.5.3
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.js +18 -14
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -3633,15 +3633,17 @@ function createAttributeStrategies$1(enabledProperties) {
|
|
|
3633
3633
|
return getListTypeFromListStyleType(value) == item.getAttribute("listType");
|
|
3634
3634
|
},
|
|
3635
3635
|
setAttributeOnDowncast(writer, listStyle, element) {
|
|
3636
|
-
if (listStyle && listStyle !== DEFAULT_LIST_TYPE$1)
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3636
|
+
if (listStyle && listStyle !== DEFAULT_LIST_TYPE$1) {
|
|
3637
|
+
if (useAttribute) {
|
|
3638
|
+
const value = getTypeAttributeFromListStyleType(listStyle);
|
|
3639
|
+
if (value) {
|
|
3640
|
+
writer.setAttribute("type", value, element);
|
|
3641
|
+
return;
|
|
3642
|
+
}
|
|
3643
|
+
} else {
|
|
3644
|
+
writer.setStyle("list-style-type", listStyle, element);
|
|
3640
3645
|
return;
|
|
3641
3646
|
}
|
|
3642
|
-
} else {
|
|
3643
|
-
writer.setStyle("list-style-type", listStyle, element);
|
|
3644
|
-
return;
|
|
3645
3647
|
}
|
|
3646
3648
|
writer.removeStyle("list-style-type", element);
|
|
3647
3649
|
writer.removeAttribute("type", element);
|
|
@@ -5796,13 +5798,15 @@ function modelChangePostFixer(model, writer) {
|
|
|
5796
5798
|
while (item && item.is("element", "listItem")) {
|
|
5797
5799
|
const itemIndent = item.getAttribute("listIndent");
|
|
5798
5800
|
if (prev && prev.getAttribute("listIndent") > itemIndent) typesStack = typesStack.slice(0, itemIndent + 1);
|
|
5799
|
-
if (itemIndent != 0)
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5801
|
+
if (itemIndent != 0) {
|
|
5802
|
+
if (typesStack[itemIndent]) {
|
|
5803
|
+
const type = typesStack[itemIndent];
|
|
5804
|
+
if (item.getAttribute("listType") != type) {
|
|
5805
|
+
writer.setAttribute("listType", type, item);
|
|
5806
|
+
applied = true;
|
|
5807
|
+
}
|
|
5808
|
+
} else typesStack[itemIndent] = item.getAttribute("listType");
|
|
5809
|
+
}
|
|
5806
5810
|
prev = item;
|
|
5807
5811
|
item = item.nextSibling;
|
|
5808
5812
|
}
|