@portabletext/editor 1.41.0 → 1.41.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 +9 -71
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +9 -71
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/editor/Editable.tsx +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/editor",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"description": "Portable Text Editor made in React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"slate-react": "0.112.1",
|
|
80
80
|
"use-effect-event": "^1.0.2",
|
|
81
81
|
"xstate": "^5.19.2",
|
|
82
|
-
"@portabletext/
|
|
83
|
-
"@portabletext/
|
|
82
|
+
"@portabletext/block-tools": "1.1.14",
|
|
83
|
+
"@portabletext/patches": "1.1.3"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@portabletext/toolkit": "^2.0.17",
|
package/src/editor/Editable.tsx
CHANGED
|
@@ -1122,16 +1122,6 @@ export const PortableTextEditable = forwardRef<
|
|
|
1122
1122
|
return
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
-
const snapshot = getEditorSnapshot({
|
|
1126
|
-
editorActorSnapshot: editorActor.getSnapshot(),
|
|
1127
|
-
slateEditorInstance: slateEditor,
|
|
1128
|
-
})
|
|
1129
|
-
|
|
1130
|
-
if (draggingOnDragOrigin({snapshot, position})) {
|
|
1131
|
-
event.preventDefault()
|
|
1132
|
-
return
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
1125
|
editorActor.send({
|
|
1136
1126
|
type: 'behavior event',
|
|
1137
1127
|
behaviorEvent: {
|
|
@@ -1192,16 +1182,6 @@ export const PortableTextEditable = forwardRef<
|
|
|
1192
1182
|
return
|
|
1193
1183
|
}
|
|
1194
1184
|
|
|
1195
|
-
const snapshot = getEditorSnapshot({
|
|
1196
|
-
editorActorSnapshot: editorActor.getSnapshot(),
|
|
1197
|
-
slateEditorInstance: slateEditor,
|
|
1198
|
-
})
|
|
1199
|
-
|
|
1200
|
-
if (draggingOnDragOrigin({snapshot, position})) {
|
|
1201
|
-
event.preventDefault()
|
|
1202
|
-
return
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
1185
|
editorActor.send({
|
|
1206
1186
|
type: 'behavior event',
|
|
1207
1187
|
behaviorEvent: {
|
|
@@ -1245,7 +1225,6 @@ export const PortableTextEditable = forwardRef<
|
|
|
1245
1225
|
|
|
1246
1226
|
if (draggingOnDragOrigin({snapshot, position})) {
|
|
1247
1227
|
event.preventDefault()
|
|
1248
|
-
return
|
|
1249
1228
|
}
|
|
1250
1229
|
|
|
1251
1230
|
editorActor.send({
|
|
@@ -1286,16 +1265,6 @@ export const PortableTextEditable = forwardRef<
|
|
|
1286
1265
|
return
|
|
1287
1266
|
}
|
|
1288
1267
|
|
|
1289
|
-
const snapshot = getEditorSnapshot({
|
|
1290
|
-
editorActorSnapshot: editorActor.getSnapshot(),
|
|
1291
|
-
slateEditorInstance: slateEditor,
|
|
1292
|
-
})
|
|
1293
|
-
|
|
1294
|
-
if (draggingOnDragOrigin({snapshot, position})) {
|
|
1295
|
-
event.preventDefault()
|
|
1296
|
-
return
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
1268
|
editorActor.send({
|
|
1300
1269
|
type: 'behavior event',
|
|
1301
1270
|
behaviorEvent: {
|
|
@@ -1341,16 +1310,6 @@ export const PortableTextEditable = forwardRef<
|
|
|
1341
1310
|
return
|
|
1342
1311
|
}
|
|
1343
1312
|
|
|
1344
|
-
const snapshot = getEditorSnapshot({
|
|
1345
|
-
editorActorSnapshot: editorActor.getSnapshot(),
|
|
1346
|
-
slateEditorInstance: slateEditor,
|
|
1347
|
-
})
|
|
1348
|
-
|
|
1349
|
-
if (draggingOnDragOrigin({snapshot, position})) {
|
|
1350
|
-
event.preventDefault()
|
|
1351
|
-
return
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
1313
|
editorActor.send({
|
|
1355
1314
|
type: 'behavior event',
|
|
1356
1315
|
behaviorEvent: {
|