@seafile/seafile-editor 2.0.31-beta → 2.0.31-beta1

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.
@@ -129,8 +129,8 @@ const InlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
129
129
  };
130
130
  // eslint-disable-next-line react-hooks/exhaustive-deps
131
131
  }, []);
132
- const handleClear = (0, _react.useCallback)(editorId => {
133
- if (editorId !== editor._id) return;
132
+ const handleClear = (0, _react.useCallback)(targetEditor => {
133
+ if (targetEditor._id !== editor._id) return;
134
134
  editor.children = [{
135
135
  type: _elementTypes.PARAGRAPH,
136
136
  id: _slugid.default.nice(),
@@ -12,14 +12,14 @@ var _helper = require("../extension/plugins/image/helper");
12
12
  var _helper2 = require("../extension/plugins/link/helper");
13
13
  const useAttachments = editor => {
14
14
  (0, _react.useEffect)(() => {
15
- const insertImage = (editorId, _ref) => {
15
+ const insertImage = (targetEditor, _ref) => {
16
16
  let {
17
17
  title,
18
18
  url,
19
19
  isImage,
20
20
  selection = editor.selection
21
21
  } = _ref;
22
- if (editorId !== editor._id) return;
22
+ if ((targetEditor === null || targetEditor === void 0 ? void 0 : targetEditor._id) !== editor._id) return;
23
23
  if (isImage) {
24
24
  (0, _helper.insertSeafileImage)({
25
25
  editor,
@@ -30,8 +30,8 @@ const FallbackEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
30
30
  setTimeout(() => inputRef.current.focus());
31
31
  }
32
32
  }, [enableEdit]);
33
- const handleClear = (0, _react.useCallback)(editorId => {
34
- if (editorId !== editor._id) return;
33
+ const handleClear = (0, _react.useCallback)(targetEditor => {
34
+ if (targetEditor._id !== editor._id) return;
35
35
  setValue('');
36
36
  inputRef.current.focus();
37
37
  }, [editor]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "2.0.31beta",
3
+ "version": "2.0.31beta1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {