@trafica/editor 1.0.41 → 1.0.42
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 +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1415,6 +1415,14 @@ function getActiveBlockType(doc, selection) {
|
|
|
1415
1415
|
const level = (_b = (_a = node.attrs) == null ? void 0 : _a.level) != null ? _b : 1;
|
|
1416
1416
|
return `heading-${level}`;
|
|
1417
1417
|
}
|
|
1418
|
+
if (type === "list_item" && depth > 0) {
|
|
1419
|
+
const parent = getNodeAtPath(doc, path.slice(0, depth - 1));
|
|
1420
|
+
if (parent && !isTextNode(parent)) {
|
|
1421
|
+
const pt = parent.type;
|
|
1422
|
+
if (pt === "bullet_list" || pt === "ordered_list") return pt;
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
if (type === "check_list_item") return "check_list";
|
|
1418
1426
|
return type;
|
|
1419
1427
|
}
|
|
1420
1428
|
}
|