@seafile/sdoc-editor 1.0.198-test0.6 → 1.0.198-test0.8
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.
|
@@ -62,11 +62,12 @@ const generateWhiteboardNode = function (repoID) {
|
|
|
62
62
|
};
|
|
63
63
|
exports.generateWhiteboardNode = generateWhiteboardNode;
|
|
64
64
|
const insertWhiteboard = (editor, filename, filePath) => {
|
|
65
|
-
console.log(8, editor);
|
|
65
|
+
console.log(8, editor.selection);
|
|
66
66
|
if (isInsertWhiteboardMenuDisabled(editor)) return;
|
|
67
67
|
const {
|
|
68
68
|
repoID
|
|
69
69
|
} = window.app.pageOptions;
|
|
70
|
+
console.log(9, repoID);
|
|
70
71
|
const {
|
|
71
72
|
selection
|
|
72
73
|
} = editor;
|
|
@@ -10,12 +10,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _eventBus = _interopRequireDefault(require("../../../utils/event-bus"));
|
|
11
11
|
var _constants = require("../../../../constants");
|
|
12
12
|
require("./index.css");
|
|
13
|
-
const Whiteboard =
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const Whiteboard = (editor, element) => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
filePath,
|
|
16
17
|
repoID,
|
|
17
|
-
|
|
18
|
-
} =
|
|
18
|
+
title
|
|
19
|
+
} = element;
|
|
19
20
|
const whiteboardRef = (0, _react.useRef)();
|
|
20
21
|
const [tldraw, setTldraw] = (0, _react.useState)(null);
|
|
21
22
|
console.log(33, repoID, filePath);
|
|
@@ -42,8 +43,12 @@ const Whiteboard = _ref => {
|
|
|
42
43
|
}));
|
|
43
44
|
};
|
|
44
45
|
function renderWhiteboard(props, editor) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const {
|
|
47
|
+
element
|
|
48
|
+
} = props;
|
|
49
|
+
console.log(3, props);
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(Whiteboard, {
|
|
51
|
+
editor: editor,
|
|
52
|
+
element: element
|
|
53
|
+
});
|
|
49
54
|
}
|