@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 CHANGED
@@ -1417,6 +1417,14 @@ function getActiveBlockType(doc, selection) {
1417
1417
  const level = (_b = (_a = node.attrs) == null ? void 0 : _a.level) != null ? _b : 1;
1418
1418
  return `heading-${level}`;
1419
1419
  }
1420
+ if (type === "list_item" && depth > 0) {
1421
+ const parent = getNodeAtPath(doc, path.slice(0, depth - 1));
1422
+ if (parent && !isTextNode(parent)) {
1423
+ const pt = parent.type;
1424
+ if (pt === "bullet_list" || pt === "ordered_list") return pt;
1425
+ }
1426
+ }
1427
+ if (type === "check_list_item") return "check_list";
1420
1428
  return type;
1421
1429
  }
1422
1430
  }