@kaitify/core 0.0.2-beta.11 → 0.0.2-beta.12

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.
@@ -36046,6 +36046,11 @@ const TableExtension = () => Extension.create({
36046
36046
  if (isHideCell(node)) {
36047
36047
  node.void = true;
36048
36048
  }
36049
+ if (!node.hasChildren()) {
36050
+ const placeholderNode = KNode.createPlaceholder();
36051
+ node.children = [placeholderNode];
36052
+ placeholderNode.parent = node;
36053
+ }
36049
36054
  }
36050
36055
  if (node.isMatch({ tag: "colgroup" })) {
36051
36056
  node.type = "block";
@@ -37326,9 +37331,7 @@ class Editor {
37326
37331
  const tag = dom.nodeName.toLocaleLowerCase();
37327
37332
  const namespace = dom.namespaceURI;
37328
37333
  if (this.emptyRenderTags.includes(tag)) {
37329
- return KNode.create({
37330
- type: "text"
37331
- });
37334
+ return KNode.createZeroWidthText();
37332
37335
  }
37333
37336
  if (tag == this.textRenderTag && dom.childNodes.length && Array.from(dom.childNodes).every((childNode) => childNode.nodeType == 3)) {
37334
37337
  return KNode.create({
@@ -38014,7 +38017,7 @@ class Editor {
38014
38017
  } else {
38015
38018
  this.delete();
38016
38019
  }
38017
- this.insertNode(node);
38020
+ this.insertNode(node, cover);
38018
38021
  return;
38019
38022
  }
38020
38023
  const offset = this.selection.start.offset;