@portabletext/editor 1.1.8 → 1.1.9
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 +11 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +11 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/editor/plugins/createWithPortableTextMarkModel.ts +12 -0
package/lib/index.mjs
CHANGED
|
@@ -3507,6 +3507,17 @@ function createWithPortableTextMarkModel(editorActor, types) {
|
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
3509
|
}
|
|
3510
|
+
if (atTheBeginningOfSpan && !spanIsEmpty && previousSpan) {
|
|
3511
|
+
Transforms.insertNodes(editor, {
|
|
3512
|
+
_type: "span",
|
|
3513
|
+
_key: editorActor.getSnapshot().context.keyGenerator(),
|
|
3514
|
+
text: op.text,
|
|
3515
|
+
marks: (previousSpan.marks ?? []).filter(
|
|
3516
|
+
(mark) => decorators.includes(mark)
|
|
3517
|
+
)
|
|
3518
|
+
});
|
|
3519
|
+
return;
|
|
3520
|
+
}
|
|
3510
3521
|
}
|
|
3511
3522
|
}
|
|
3512
3523
|
if (op.type === "remove_text") {
|