@seafile/sdoc-editor 1.0.159 → 1.0.161
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.
|
@@ -52,7 +52,7 @@ class JSBridge {
|
|
|
52
52
|
if (typeof key !== 'string') {
|
|
53
53
|
throw new Error('Event type must be a string.');
|
|
54
54
|
}
|
|
55
|
-
if (typeof
|
|
55
|
+
if (typeof callback !== 'function') {
|
|
56
56
|
throw new Error('The handler function must be a function.');
|
|
57
57
|
}
|
|
58
58
|
this.eventHandlerMap[key] = callback;
|
|
@@ -10,7 +10,10 @@ var _jsBridge = _interopRequireDefault(require("./js-bridge"));
|
|
|
10
10
|
const updateOutlineValue = value => {
|
|
11
11
|
if (!value || !Array.isArray(value)) return;
|
|
12
12
|
const outlines = value === null || value === void 0 ? void 0 : value.filter(item => ['header1', 'header2', 'header3'].includes(item.type));
|
|
13
|
-
window.
|
|
13
|
+
if (!window.seadroid) {
|
|
14
|
+
window.seadroid = {};
|
|
15
|
+
}
|
|
16
|
+
window.seadroid['outlines'] = outlines;
|
|
14
17
|
};
|
|
15
18
|
exports.updateOutlineValue = updateOutlineValue;
|
|
16
19
|
const scrollToOutline = item => {
|
|
@@ -180,8 +180,8 @@ const QuickInsertBlockMenu = _ref => {
|
|
|
180
180
|
editor: editor,
|
|
181
181
|
target: "sdoc-side-menu-item-table",
|
|
182
182
|
trigger: "hover",
|
|
183
|
-
placement: "
|
|
184
|
-
popperClassName: "sdoc-side-menu-table-size",
|
|
183
|
+
placement: "left-start",
|
|
184
|
+
popperClassName: "sdoc-side-menu-table-size sdoc-insert-element-table-size-wrapper",
|
|
185
185
|
createTable: createTable
|
|
186
186
|
})),
|
|
187
187
|
[_constants.LINK]: /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
|