@seafile/sdoc-editor 1.0.206 → 1.0.208

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.
@@ -340,7 +340,10 @@ function AIModule(_ref) {
340
340
  const onInsertClick = (0, _react.useCallback)(() => {
341
341
  let nextPath = null;
342
342
  if (!element) {
343
- const aboveNode = (0, _core.getAboveBlockNode)(editor);
343
+ const end = _slate.Range.end(editor.selection);
344
+ const aboveNode = (0, _core.getAboveBlockNode)(editor, {
345
+ at: end
346
+ });
344
347
  nextPath = _slate.Path.next(aboveNode[1]);
345
348
  } else {
346
349
  const path = _slateReact.ReactEditor.findPath(editor, element);
@@ -382,7 +385,10 @@ function AIModule(_ref) {
382
385
  editor.insertText(searchResult);
383
386
  }
384
387
  onCloseClick();
385
- const aboveNode = (0, _core.getAboveBlockNode)(editor);
388
+ const end = _slate.Range.end(editor.selection);
389
+ const aboveNode = (0, _core.getAboveBlockNode)(editor, {
390
+ at: end
391
+ });
386
392
  focusToEndPath(aboveNode[1]);
387
393
  } else {
388
394
  const path = _slateReact.ReactEditor.findPath(editor, element);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.206",
3
+ "version": "1.0.208",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
7
7
  "dependencies": {
8
8
  "@seafile/print-js": "1.6.6",
9
- "@seafile/react-image-lightbox": "2.0.5",
9
+ "@seafile/react-image-lightbox": "4.0.0",
10
10
  "@seafile/slate": "0.91.8",
11
11
  "@seafile/slate-history": "0.86.2",
12
12
  "@seafile/slate-hyperscript": "0.81.7",