@portabletext/editor 1.0.16 → 1.0.17
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 +1 -7
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -7
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -7
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/editor/plugins/createWithEditableAPI.ts +1 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Portable Text Editor made in React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@jest/globals": "^29.7.0",
|
|
54
|
+
"@jest/types": "^29.6.3",
|
|
54
55
|
"@playwright/test": "1.46.1",
|
|
55
56
|
"@portabletext/toolkit": "^2.0.15",
|
|
56
57
|
"@sanity/block-tools": "^3.55.0",
|
|
@@ -419,16 +419,7 @@ export function createWithEditableAPI(
|
|
|
419
419
|
)
|
|
420
420
|
}
|
|
421
421
|
editor.onChange()
|
|
422
|
-
|
|
423
|
-
// Insert an empty string to continue writing non-annotated text
|
|
424
|
-
Transforms.insertNodes(
|
|
425
|
-
editor,
|
|
426
|
-
[{_type: 'span', text: '', marks: [], _key: keyGenerator()}],
|
|
427
|
-
{
|
|
428
|
-
at: Range.end(editor.selection),
|
|
429
|
-
},
|
|
430
|
-
)
|
|
431
|
-
}
|
|
422
|
+
|
|
432
423
|
const newPortableTextEditorSelection = toPortableTextRange(
|
|
433
424
|
fromSlateValue(editor.children, types.block.name, KEY_TO_VALUE_ELEMENT.get(editor)),
|
|
434
425
|
editor.selection,
|