lexical 0.34.1-nightly.20250901.0 → 0.34.1-nightly.20250903.0

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/Lexical.dev.js CHANGED
@@ -5587,13 +5587,17 @@ function $transferStartingElementPointToTextPoint(start, end, format, style) {
5587
5587
  const element = start.getNode();
5588
5588
  const placementNode = element.getChildAtIndex(start.offset);
5589
5589
  const textNode = $createTextNode();
5590
- const target = $isRootNode(element) ? $createParagraphNode().append(textNode) : textNode;
5591
5590
  textNode.setFormat(format);
5592
5591
  textNode.setStyle(style);
5593
- if (placementNode === null) {
5594
- element.append(target);
5592
+ if ($isParagraphNode(placementNode)) {
5593
+ placementNode.splice(0, 0, [textNode]);
5595
5594
  } else {
5596
- placementNode.insertBefore(target);
5595
+ const target = $isRootNode(element) ? $createParagraphNode().append(textNode) : textNode;
5596
+ if (placementNode === null) {
5597
+ element.append(target);
5598
+ } else {
5599
+ placementNode.insertBefore(target);
5600
+ }
5597
5601
  }
5598
5602
  // Transfer the element point to a text point.
5599
5603
  if (start.is(end)) {
@@ -10722,7 +10726,7 @@ class LexicalEditor {
10722
10726
  };
10723
10727
  }
10724
10728
  }
10725
- LexicalEditor.version = "0.34.1-nightly.20250901.0+dev.cjs";
10729
+ LexicalEditor.version = "0.34.1-nightly.20250903.0+dev.cjs";
10726
10730
 
10727
10731
  let pendingNodeToClone = null;
10728
10732
  function setPendingNodeToClone(pendingNode) {
package/Lexical.dev.mjs CHANGED
@@ -5585,13 +5585,17 @@ function $transferStartingElementPointToTextPoint(start, end, format, style) {
5585
5585
  const element = start.getNode();
5586
5586
  const placementNode = element.getChildAtIndex(start.offset);
5587
5587
  const textNode = $createTextNode();
5588
- const target = $isRootNode(element) ? $createParagraphNode().append(textNode) : textNode;
5589
5588
  textNode.setFormat(format);
5590
5589
  textNode.setStyle(style);
5591
- if (placementNode === null) {
5592
- element.append(target);
5590
+ if ($isParagraphNode(placementNode)) {
5591
+ placementNode.splice(0, 0, [textNode]);
5593
5592
  } else {
5594
- placementNode.insertBefore(target);
5593
+ const target = $isRootNode(element) ? $createParagraphNode().append(textNode) : textNode;
5594
+ if (placementNode === null) {
5595
+ element.append(target);
5596
+ } else {
5597
+ placementNode.insertBefore(target);
5598
+ }
5595
5599
  }
5596
5600
  // Transfer the element point to a text point.
5597
5601
  if (start.is(end)) {
@@ -10720,7 +10724,7 @@ class LexicalEditor {
10720
10724
  };
10721
10725
  }
10722
10726
  }
10723
- LexicalEditor.version = "0.34.1-nightly.20250901.0+dev.esm";
10727
+ LexicalEditor.version = "0.34.1-nightly.20250903.0+dev.esm";
10724
10728
 
10725
10729
  let pendingNodeToClone = null;
10726
10730
  function setPendingNodeToClone(pendingNode) {