@pie-lib/editable-html 8.1.2 → 9.0.0
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/CHANGELOG.md +34 -0
- package/lib/editor.js +35 -5
- package/lib/editor.js.map +1 -1
- package/lib/plugins/characters/index.js +6 -1
- package/lib/plugins/characters/index.js.map +1 -1
- package/lib/plugins/characters/utils.js +24 -4
- package/lib/plugins/characters/utils.js.map +1 -1
- package/lib/plugins/image/component.js +34 -5
- package/lib/plugins/image/component.js.map +1 -1
- package/lib/plugins/image/image-toolbar.js +53 -4
- package/lib/plugins/image/image-toolbar.js.map +1 -1
- package/lib/plugins/image/index.js +42 -7
- package/lib/plugins/image/index.js.map +1 -1
- package/lib/plugins/respArea/index.js +5 -0
- package/lib/plugins/respArea/index.js.map +1 -1
- package/lib/plugins/table/index.js +4 -2
- package/lib/plugins/table/index.js.map +1 -1
- package/package.json +5 -5
- package/src/editor.jsx +34 -16
- package/src/plugins/characters/index.jsx +7 -0
- package/src/plugins/characters/utils.js +8 -4
- package/src/plugins/image/component.jsx +49 -20
- package/src/plugins/image/image-toolbar.jsx +38 -2
- package/src/plugins/image/index.jsx +38 -9
- package/src/plugins/respArea/index.jsx +5 -0
- package/src/plugins/table/index.jsx +3 -3
|
@@ -166,7 +166,7 @@ export default (opts, toolbarPlugins /* : {toolbar: {}}[] */) => {
|
|
|
166
166
|
customToolbar: (node, value, onToolbarDone) => {
|
|
167
167
|
log('[customToolbar] node.data: ', node.data);
|
|
168
168
|
|
|
169
|
-
const tableBlock = core.utils.getTableBlock(value.document, node
|
|
169
|
+
const tableBlock = core.utils.getTableBlock(value.document, node?.key);
|
|
170
170
|
log('[customToolbar] tableBlock: ', tableBlock);
|
|
171
171
|
|
|
172
172
|
const hasBorder = () =>
|
|
@@ -295,8 +295,8 @@ export default (opts, toolbarPlugins /* : {toolbar: {}}[] */) => {
|
|
|
295
295
|
if (prevText) {
|
|
296
296
|
// we move focus to the previous text
|
|
297
297
|
change
|
|
298
|
-
.moveFocusTo(prevText.key, prevText.text
|
|
299
|
-
.moveAnchorTo(prevText.key, prevText.text
|
|
298
|
+
.moveFocusTo(prevText.key, prevText.text?.length)
|
|
299
|
+
.moveAnchorTo(prevText.key, prevText.text?.length);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// we insert the table block between the first block with text and the last block with text
|