@vonaffenfels/slate-editor 1.1.44 → 1.1.46
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.46",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"cssnano": "^5.0.1",
|
|
73
73
|
"escape-html": "^1.0.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "2d105aa46d2732605b2c39a53ed41fb335b5d21a",
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
}
|
package/src/BlockEditor.js
CHANGED
|
@@ -156,6 +156,11 @@ export default function BlockEditor({
|
|
|
156
156
|
|
|
157
157
|
const newValueFixed = fixValue(newValue);
|
|
158
158
|
|
|
159
|
+
// fix for unnecessary value changes, not so pretty but works
|
|
160
|
+
if (JSON.stringify(newValueFixed) === JSON.stringify(value)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
if (newValueFixed.length > 0) {
|
|
160
165
|
onChange(newValueFixed);
|
|
161
166
|
} else {
|
|
@@ -232,6 +237,9 @@ export default function BlockEditor({
|
|
|
232
237
|
}, []);
|
|
233
238
|
|
|
234
239
|
const handleSidebarEditorChange = newElement => {
|
|
240
|
+
console.log("Vincent-Debug, BlockEditor.js:237", "sidebar editor change");
|
|
241
|
+
|
|
242
|
+
|
|
235
243
|
let newNodeProps = {
|
|
236
244
|
block: newElement.block,
|
|
237
245
|
isEmpty: false,
|
|
@@ -387,7 +395,10 @@ export default function BlockEditor({
|
|
|
387
395
|
<Slate
|
|
388
396
|
editor={editor}
|
|
389
397
|
value={value}
|
|
390
|
-
onChange={
|
|
398
|
+
onChange={v => {
|
|
399
|
+
onSlateChange(v);
|
|
400
|
+
console.log("YEEEEEE");
|
|
401
|
+
}}
|
|
391
402
|
>
|
|
392
403
|
<div>
|
|
393
404
|
<Toolbar
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
Asset, AssetList,
|
|
3
|
+
} from "../AssetList";
|
|
3
4
|
import {reduceContentfulResponse} from "../../util/reduceContentfulResponse";
|
|
4
5
|
|
|
5
6
|
export const ContentfulContentSelect = ({
|