@portabletext/editor 2.15.0 → 2.15.1
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.cjs +18 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +18 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/index.d.cts +2 -2
- package/package.json +8 -8
- package/src/operations/behavior.operation.insert.child.ts +47 -21
package/lib/index.js
CHANGED
|
@@ -4990,8 +4990,24 @@ const insertChildOperationImplementation = ({
|
|
|
4990
4990
|
_key,
|
|
4991
4991
|
_type,
|
|
4992
4992
|
...rest
|
|
4993
|
-
} = inlineObject
|
|
4994
|
-
|
|
4993
|
+
} = inlineObject, [focusSpan] = getFocusSpan({
|
|
4994
|
+
editor: operation.editor
|
|
4995
|
+
});
|
|
4996
|
+
focusSpan ? Transforms.insertNodes(operation.editor, {
|
|
4997
|
+
_key,
|
|
4998
|
+
_type,
|
|
4999
|
+
children: [{
|
|
5000
|
+
_key: VOID_CHILD_KEY,
|
|
5001
|
+
_type: "span",
|
|
5002
|
+
text: "",
|
|
5003
|
+
marks: []
|
|
5004
|
+
}],
|
|
5005
|
+
value: rest,
|
|
5006
|
+
__inline: !0
|
|
5007
|
+
}, {
|
|
5008
|
+
at: focus,
|
|
5009
|
+
select: !0
|
|
5010
|
+
}) : Transforms.insertNodes(operation.editor, {
|
|
4995
5011
|
_key,
|
|
4996
5012
|
_type,
|
|
4997
5013
|
children: [{
|