@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.js
CHANGED
|
@@ -2838,10 +2838,6 @@ function createWithPortableTextMarkModel(types2, change$, keyGenerator) {
|
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
if (isSpan && Array.isArray(node.marks) && (!node.marks || node.marks.length > 0 && node.text === "")) {
|
|
2842
|
-
slate.Transforms.setNodes(editor, { marks: [] }, { at: path, voids: !1 });
|
|
2843
|
-
return;
|
|
2844
|
-
}
|
|
2845
2841
|
}
|
|
2846
2842
|
if (editor.isTextBlock(node) && !editor.operations.some(
|
|
2847
2843
|
(op) => op.type === "merge_node" && "markDefs" in op.properties && op.path.length === 1
|
|
@@ -2925,6 +2921,12 @@ function createWithPortableTextMarkModel(types2, change$, keyGenerator) {
|
|
|
2925
2921
|
}), editor.onChange();
|
|
2926
2922
|
return;
|
|
2927
2923
|
}
|
|
2924
|
+
if (node.marks !== void 0 && node.marks.length > 0 && deletingAllText) {
|
|
2925
|
+
slate.Editor.withoutNormalizing(editor, () => {
|
|
2926
|
+
apply2(op), slate.Transforms.setNodes(editor, { marks: [] }, { at: op.path });
|
|
2927
|
+
}), editor.onChange();
|
|
2928
|
+
return;
|
|
2929
|
+
}
|
|
2928
2930
|
}
|
|
2929
2931
|
}
|
|
2930
2932
|
apply2(op);
|