@portabletext/editor 1.0.15 → 1.0.16
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/lib/index.esm.js +6 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6 -4
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -4
- package/lib/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/editor/plugins/createWithPortableTextMarkModel.ts +12 -9
package/lib/index.esm.js
CHANGED
|
@@ -2854,10 +2854,6 @@ function createWithPortableTextMarkModel(types, change$, keyGenerator) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
}
|
|
2856
2856
|
}
|
|
2857
|
-
if (isSpan && Array.isArray(node.marks) && (!node.marks || node.marks.length > 0 && node.text === "")) {
|
|
2858
|
-
Transforms.setNodes(editor, { marks: [] }, { at: path, voids: !1 });
|
|
2859
|
-
return;
|
|
2860
|
-
}
|
|
2861
2857
|
}
|
|
2862
2858
|
if (editor.isTextBlock(node) && !editor.operations.some(
|
|
2863
2859
|
(op) => op.type === "merge_node" && "markDefs" in op.properties && op.path.length === 1
|
|
@@ -2941,6 +2937,12 @@ function createWithPortableTextMarkModel(types, change$, keyGenerator) {
|
|
|
2941
2937
|
}), editor.onChange();
|
|
2942
2938
|
return;
|
|
2943
2939
|
}
|
|
2940
|
+
if (node.marks !== void 0 && node.marks.length > 0 && deletingAllText) {
|
|
2941
|
+
Editor.withoutNormalizing(editor, () => {
|
|
2942
|
+
apply2(op), Transforms.setNodes(editor, { marks: [] }, { at: op.path });
|
|
2943
|
+
}), editor.onChange();
|
|
2944
|
+
return;
|
|
2945
|
+
}
|
|
2944
2946
|
}
|
|
2945
2947
|
}
|
|
2946
2948
|
apply2(op);
|