@seafile/seafile-editor 1.0.85-beta3 → 1.0.85-beta4
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.
|
@@ -20,6 +20,7 @@ const isMacOS = (0, _common.isMac)();
|
|
|
20
20
|
const SimpleSlateEditor = _ref => {
|
|
21
21
|
let {
|
|
22
22
|
isInline,
|
|
23
|
+
showTitle,
|
|
23
24
|
focusNodePath,
|
|
24
25
|
value,
|
|
25
26
|
editorApi,
|
|
@@ -131,7 +132,7 @@ const SimpleSlateEditor = _ref => {
|
|
|
131
132
|
}, [editor, focusNode]);
|
|
132
133
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
133
134
|
className: "sf-simple-slate-editor-container"
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(ToolbarComponent, {
|
|
135
|
+
}, showTitle && /*#__PURE__*/_react.default.createElement(ToolbarComponent, {
|
|
135
136
|
editor: editor,
|
|
136
137
|
isSupportFormula: isSupportFormula,
|
|
137
138
|
isSupportColumn: !!columns,
|
|
@@ -14,6 +14,7 @@ var _longtextEditorDialog = _interopRequireDefault(require("../longtext-editor-d
|
|
|
14
14
|
require("./index.css");
|
|
15
15
|
const Editor = _ref => {
|
|
16
16
|
let {
|
|
17
|
+
showTitle,
|
|
17
18
|
lang,
|
|
18
19
|
headerName,
|
|
19
20
|
value: propsValue,
|
|
@@ -101,6 +102,7 @@ const Editor = _ref => {
|
|
|
101
102
|
ref: editorContainerRef
|
|
102
103
|
}, !showExpandEditor && !isWindowsWechat ? /*#__PURE__*/_react.default.createElement(_simpleEditor.default, {
|
|
103
104
|
isInline: true,
|
|
105
|
+
showTitle: showTitle,
|
|
104
106
|
focusNodePath: focusNodePath,
|
|
105
107
|
ref: editorRef,
|
|
106
108
|
value: value.text,
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _isHotkey = _interopRequireDefault(require("is-hotkey"));
|
|
11
|
-
var
|
|
11
|
+
var _clickOutside = _interopRequireDefault(require("./click-outside"));
|
|
12
12
|
var _formatter = _interopRequireDefault(require("./formatter"));
|
|
13
13
|
var _editor = _interopRequireDefault(require("./editor"));
|
|
14
14
|
var _slateConvert = require("../../slate-convert");
|
|
@@ -83,21 +83,28 @@ const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
|
|
|
83
83
|
closeEditor: closeEditor
|
|
84
84
|
};
|
|
85
85
|
}, [openEditor, closeEditor]);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
86
|
+
|
|
87
|
+
// if (!isShowEditor) {
|
|
88
|
+
// const richValue = mdStringToSlate(valueRef.current.text);
|
|
89
|
+
// return (
|
|
90
|
+
// <div className="sf-long-text-inline-editor-container preview" onClick={(event) => previewClick(event, richValue)} >
|
|
91
|
+
// <Formatter value={isWindowsWechat ? valueRef.current : richValue} />
|
|
92
|
+
// </div>
|
|
93
|
+
// );
|
|
94
|
+
// }
|
|
95
|
+
|
|
96
|
+
const onClick = (0, _react.useCallback)(() => {
|
|
97
|
+
if (isShowEditor) return;
|
|
98
|
+
setShowEditor(true);
|
|
99
|
+
}, [isShowEditor]);
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_clickOutside.default, {
|
|
96
101
|
onClickOutside: closeEditor
|
|
97
102
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
98
103
|
className: "w-100",
|
|
99
|
-
onKeyDown: onHotKey
|
|
104
|
+
onKeyDown: onHotKey,
|
|
105
|
+
onClick: onClick
|
|
100
106
|
}, /*#__PURE__*/_react.default.createElement(_editor.default, {
|
|
107
|
+
showTitle: isShowEditor,
|
|
101
108
|
lang: lang,
|
|
102
109
|
isWindowsWechat: isWindowsWechat,
|
|
103
110
|
headerName: headerName,
|
package/package.json
CHANGED
|
File without changes
|