@seafile/sdoc-editor 1.0.94 → 1.0.95

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.
@@ -19,7 +19,7 @@ class ImagePreviewer extends _react.default.Component {
19
19
  while (nodes && nodeIndex <= nodes.length - 1) {
20
20
  const currentNode = nodes[nodeIndex];
21
21
  if (currentNode.type === 'image') {
22
- const url = (0, _helpers.getImageURL)(currentNode.data.src);
22
+ const url = (0, _helpers.getImageURL)(currentNode.data);
23
23
  url && list.push(url);
24
24
  } else {
25
25
  list.push(...this.getImageNodes(currentNode.children));
@@ -63,7 +63,9 @@ const insertImage = function (editor, srcList, selection) {
63
63
  }
64
64
  const imageNodes = srcList.map(src => {
65
65
  const isCommentEditor = editor.editorType === _constants.COMMENT_EDITOR;
66
- const imgSrc = isCommentEditor ? getImageURL(src) : src;
66
+ const imgSrc = isCommentEditor ? getImageURL({
67
+ src
68
+ }) : src;
67
69
  return generateImageNode(imgSrc);
68
70
  });
69
71
  const validSelection = selection || editor.selection;
@@ -292,7 +292,7 @@ const ImageHoverMenu = _ref => {
292
292
  className: "sdocfont sdoc-check-mark sdoc-dropdown-item-right-icon"
293
293
  })));
294
294
  })), isShowImagePreview && /*#__PURE__*/_react.default.createElement(_imagePreviewer.default, {
295
- imageUrl: (0, _helpers.getImageURL)(data.src),
295
+ imageUrl: (0, _helpers.getImageURL)(data),
296
296
  editor: editor,
297
297
  toggleImagePreviewer: () => {
298
298
  setIsShowImagePreview(!isShowImagePreview);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.94",
3
+ "version": "1.0.95",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",