@seafile/sdoc-editor 1.0.199 → 1.0.200
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.
|
@@ -80,7 +80,9 @@ const withBlockquote = editor => {
|
|
|
80
80
|
const [, currentLinePath] = currentLineEntry;
|
|
81
81
|
const currentLineIndex = currentLinePath[blockQuotePath.length];
|
|
82
82
|
// Transforms to paragraph when Select at the beginning of the first line
|
|
83
|
-
if (currentLineIndex === 0) {
|
|
83
|
+
if (currentLineIndex === 0 && (0, _core.isSelectionAtBlockStart)(editor, {
|
|
84
|
+
at: currentLinePath
|
|
85
|
+
})) {
|
|
84
86
|
_slate.Transforms.liftNodes(editor, {
|
|
85
87
|
at: currentLinePath
|
|
86
88
|
});
|
|
@@ -34,7 +34,7 @@ const SideToolbar = () => {
|
|
|
34
34
|
const [menuPosition, setMenuPosition] = (0, _react.useState)({});
|
|
35
35
|
const [isEnterMoreVertical, setIsEnterMoreVertical] = (0, _react.useState)(false);
|
|
36
36
|
const [isMoving, setIsMoving] = (0, _react.useState)(false);
|
|
37
|
-
const sideMenuRef = (0, _react.useRef)();
|
|
37
|
+
const sideMenuRef = (0, _react.useRef)(null);
|
|
38
38
|
const draggedSourcePaths = (0, _react.useRef)(null);
|
|
39
39
|
const selectedNodesRef = (0, _react.useRef)(null);
|
|
40
40
|
const showSelectedNodesRef = (0, _react.useRef)(null);
|
|
@@ -23,14 +23,16 @@ var _toast = _interopRequireDefault(require("../../../../components/toast"));
|
|
|
23
23
|
var _constants = require("../../constants");
|
|
24
24
|
var _aiMenu = require("../../plugins/ai/ai-menu");
|
|
25
25
|
require("./side-menu.css");
|
|
26
|
-
const SideMenu = (_ref, ref) => {
|
|
26
|
+
const SideMenu = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
27
27
|
let {
|
|
28
28
|
slateNode,
|
|
29
29
|
isNodeEmpty,
|
|
30
30
|
menuPosition,
|
|
31
|
-
onReset
|
|
32
|
-
t
|
|
31
|
+
onReset
|
|
33
32
|
} = _ref;
|
|
33
|
+
const {
|
|
34
|
+
t
|
|
35
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
34
36
|
const sideMenuRef = (0, _react.useRef)(null);
|
|
35
37
|
const [menuStyle, setMenuStyle] = (0, _react.useState)('');
|
|
36
38
|
const [insertMenuSearchMap, setInsertMenuSearchMap] = (0, _react.useState)();
|
|
@@ -245,7 +247,5 @@ const SideMenu = (_ref, ref) => {
|
|
|
245
247
|
}).length === 1 && /*#__PURE__*/_react.default.createElement("div", {
|
|
246
248
|
className: "sdoc-dropdown-menu-item-no-results"
|
|
247
249
|
}, t('No_results')))));
|
|
248
|
-
};
|
|
249
|
-
var _default = exports.default =
|
|
250
|
-
withRef: true
|
|
251
|
-
})( /*#__PURE__*/(0, _react.forwardRef)(SideMenu));
|
|
250
|
+
});
|
|
251
|
+
var _default = exports.default = SideMenu;
|