@seafile/comment-editor 0.0.1-alpha.8 → 0.0.1-alpha.9

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.
@@ -291,8 +291,7 @@ const handleBase64Image = (editor, path, imgData) => {
291
291
  const file = new File([blob], `${_slugid.default.nice()}.jpg`, {
292
292
  type: unit8Array.mime
293
293
  });
294
- console.log(111);
295
- _context.default.uploadLocalImage([file]).then(res => {
294
+ _context.default.api.uploadLocalImage([file]).then(res => {
296
295
  const _data = {
297
296
  ...imgData,
298
297
  src: res[0]
@@ -51,8 +51,7 @@ const useCopyImage = _ref => {
51
51
  const file = new File([blob], 'downloaded_image.png', {
52
52
  type: blob.type
53
53
  });
54
- console.log(222);
55
- const imageUrl = await _context.default.uploadLocalImage([file]);
54
+ const imageUrl = await _context.default.api.uploadLocalImage([file]);
56
55
  if (imageUrl && imageUrl[0]) {
57
56
  updateImageNode(editor, element, imageUrl[0]);
58
57
  }
@@ -42,8 +42,7 @@ const useUploadImage = _ref => {
42
42
  const uploadCurrentImage = async () => {
43
43
  try {
44
44
  const fileItem = _imageCache.default.getImage(file_uuid);
45
- console.log(333, _context.default);
46
- const imageUrl = await _context.default.uploadLocalImage([fileItem]);
45
+ const imageUrl = await _context.default.api.uploadLocalImage([fileItem]);
47
46
  if (imageUrl && imageUrl[0]) {
48
47
  updateImageNode(editor, element, imageUrl[0]);
49
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/comment-editor",
3
- "version": "0.0.1-alpha.8",
3
+ "version": "0.0.1-alpha.9",
4
4
  "private": false,
5
5
  "description": "This is a comment editor",
6
6
  "main": "dist/index.js",