@vonaffenfels/slate-editor 1.0.43 → 1.0.44
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/dist/BlockEditor.css +1 -1
- package/dist/BlockEditor.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/scss/sidebarEditor.scss +1 -1
- package/src/BlockEditor.js +11 -0
- package/src/SidebarEditor/SidebarEditorField.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cssnano": "^5.0.1",
|
|
72
72
|
"escape-html": "^1.0.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9bcbf3b9b1002d4d41a6d23fb3ab6b567fc1de4f",
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
package/scss/sidebarEditor.scss
CHANGED
package/src/BlockEditor.js
CHANGED
|
@@ -218,6 +218,17 @@ export default function BlockEditor({
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
try {
|
|
221
|
+
editor.selection = {
|
|
222
|
+
anchor: {
|
|
223
|
+
offset: 0,
|
|
224
|
+
path,
|
|
225
|
+
},
|
|
226
|
+
focus: {
|
|
227
|
+
offset: 0,
|
|
228
|
+
path,
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
|
|
221
232
|
Transforms.moveNodes(editor, {
|
|
222
233
|
from: [path[0]],
|
|
223
234
|
match: node => {
|
|
@@ -88,9 +88,11 @@ export const SidebarEditorField = ({
|
|
|
88
88
|
return (
|
|
89
89
|
<div>
|
|
90
90
|
<input
|
|
91
|
+
id={fieldKey}
|
|
91
92
|
type="checkbox"
|
|
92
93
|
checked={value}
|
|
93
94
|
onChange={e => onChange(fieldKey, e.target.checked)} />
|
|
95
|
+
<label htmlFor={fieldKey}>{value ? "Ja" : "Nein"}</label>
|
|
94
96
|
</div>
|
|
95
97
|
);
|
|
96
98
|
case "select":
|