@seafile/seafile-editor 1.0.86 → 1.0.87-beta
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.
- package/dist/editors/inline-editor/index.js +32 -17
- package/dist/pages/longtext-inline-editor/fallback-editor.js +4 -4
- package/dist/pages/longtext-inline-editor/index.css +1 -1
- package/dist/pages/longtext-inline-editor/index.js +12 -37
- package/dist/pages/longtext-inline-editor/normal-editor.js +17 -3
- package/package.json +1 -1
- package/dist/pages/longtext-inline-editor/formatter/index.css +0 -68
- package/dist/pages/longtext-inline-editor/formatter/index.js +0 -66
|
@@ -15,20 +15,23 @@ var _eventHandler = _interopRequireDefault(require("../../utils/event-handler"))
|
|
|
15
15
|
var _withPropsEditor = _interopRequireDefault(require("./with-props-editor"));
|
|
16
16
|
var _core = require("../../extension/core");
|
|
17
17
|
var _common = require("../../utils/common");
|
|
18
|
+
var _userLinkClick = _interopRequireDefault(require("../../hooks/user-link-click"));
|
|
18
19
|
require("./index.css");
|
|
19
20
|
const isMacOS = (0, _common.isMac)();
|
|
20
21
|
const InlineEditor = _ref => {
|
|
21
22
|
let {
|
|
22
|
-
|
|
23
|
+
enableEdit,
|
|
23
24
|
value,
|
|
24
25
|
editorApi,
|
|
25
26
|
onSave,
|
|
26
27
|
columns,
|
|
27
28
|
onContentChanged,
|
|
28
29
|
isSupportFormula,
|
|
29
|
-
onExpandEditorToggle
|
|
30
|
+
onExpandEditorToggle,
|
|
31
|
+
handelEnableEdit
|
|
30
32
|
} = _ref;
|
|
31
33
|
const [slateValue, setSlateValue] = (0, _react.useState)(value);
|
|
34
|
+
const focusRangeRef = (0, _react.useRef)(null);
|
|
32
35
|
const editor = (0, _react.useMemo)(() => {
|
|
33
36
|
const baseEditor = (0, _extension.inlineEditor)();
|
|
34
37
|
return (0, _withPropsEditor.default)(baseEditor, {
|
|
@@ -52,20 +55,19 @@ const InlineEditor = _ref => {
|
|
|
52
55
|
const eventBus = _eventBus.default.getInstance();
|
|
53
56
|
eventBus.dispatch('change');
|
|
54
57
|
}, [editor, onContentChanged]);
|
|
55
|
-
const focusNode = (0, _react.useCallback)((editor,
|
|
58
|
+
const focusNode = (0, _react.useCallback)((editor, focusRange) => {
|
|
56
59
|
const [firstNode] = editor.children;
|
|
57
60
|
if (!firstNode) return;
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
61
|
+
if (focusRange && focusRange !== null && focusRange !== void 0 && focusRange.anchor) {
|
|
62
|
+
const startOfFirstNode = _slate.Editor.start(editor, focusRange.anchor.path);
|
|
63
|
+
const range = {
|
|
64
|
+
anchor: startOfFirstNode,
|
|
65
|
+
focus: startOfFirstNode
|
|
66
|
+
};
|
|
67
|
+
(0, _core.focusEditor)(editor, range);
|
|
68
|
+
setTimeout(() => (0, _core.focusEditor)(editor, focusRange), 0);
|
|
69
|
+
focusRangeRef.current = null;
|
|
70
|
+
return;
|
|
69
71
|
}
|
|
70
72
|
const [firstNodeFirstChild] = firstNode.children;
|
|
71
73
|
if (firstNodeFirstChild) {
|
|
@@ -86,7 +88,8 @@ const InlineEditor = _ref => {
|
|
|
86
88
|
});
|
|
87
89
|
const timer = setTimeout(() => {
|
|
88
90
|
editor.forceNormalize = false;
|
|
89
|
-
|
|
91
|
+
if (!enableEdit) return;
|
|
92
|
+
focusNode(editor);
|
|
90
93
|
}, 300);
|
|
91
94
|
return () => {
|
|
92
95
|
editor.forceNormalize = false;
|
|
@@ -94,6 +97,12 @@ const InlineEditor = _ref => {
|
|
|
94
97
|
};
|
|
95
98
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
99
|
}, []);
|
|
100
|
+
(0, _react.useEffect)(() => {
|
|
101
|
+
if (!enableEdit) return;
|
|
102
|
+
focusNode(editor, focusRangeRef.current);
|
|
103
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
|
+
}, [enableEdit]);
|
|
105
|
+
(0, _userLinkClick.default)();
|
|
97
106
|
|
|
98
107
|
// willUnmount
|
|
99
108
|
(0, _react.useEffect)(() => {
|
|
@@ -107,14 +116,19 @@ const InlineEditor = _ref => {
|
|
|
107
116
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
117
|
}, []);
|
|
109
118
|
const onEditorClick = (0, _react.useCallback)(() => {
|
|
119
|
+
if (!enableEdit) {
|
|
120
|
+
focusRangeRef.current = editor.selection;
|
|
121
|
+
handelEnableEdit();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
110
124
|
const value = editor.children;
|
|
111
125
|
if (value.length === 1 && _slate.Node.string(value[0]).length === 0) {
|
|
112
126
|
focusNode(editor);
|
|
113
127
|
}
|
|
114
|
-
}, [editor, focusNode]);
|
|
128
|
+
}, [enableEdit, editor, focusNode, handelEnableEdit]);
|
|
115
129
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
116
130
|
className: "sf-simple-slate-editor-container"
|
|
117
|
-
}, /*#__PURE__*/_react.default.createElement(_extension.InlineToolbar, {
|
|
131
|
+
}, enableEdit && /*#__PURE__*/_react.default.createElement(_extension.InlineToolbar, {
|
|
118
132
|
editor: editor,
|
|
119
133
|
isSupportFormula: isSupportFormula,
|
|
120
134
|
isSupportColumn: !!columns,
|
|
@@ -133,6 +147,7 @@ const InlineEditor = _ref => {
|
|
|
133
147
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
134
148
|
className: "article"
|
|
135
149
|
}, /*#__PURE__*/_react.default.createElement(_extension.SetNodeToDecorations, null), /*#__PURE__*/_react.default.createElement(_slateReact.Editable, {
|
|
150
|
+
readOnly: !enableEdit,
|
|
136
151
|
decorate: decorate,
|
|
137
152
|
renderElement: _extension.renderElement,
|
|
138
153
|
renderLeaf: _extension.renderLeaf,
|
|
@@ -10,7 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _isHotkey = _interopRequireDefault(require("is-hotkey"));
|
|
11
11
|
const FallbackEditor = _ref => {
|
|
12
12
|
let {
|
|
13
|
-
|
|
13
|
+
enableEdit,
|
|
14
14
|
value: propsValue,
|
|
15
15
|
onChange: propsOnChange,
|
|
16
16
|
closeEditor
|
|
@@ -19,11 +19,11 @@ const FallbackEditor = _ref => {
|
|
|
19
19
|
const showEditorRef = (0, _react.useRef)(false);
|
|
20
20
|
const inputRef = (0, _react.useRef)(null);
|
|
21
21
|
(0, _react.useEffect)(() => {
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
22
|
+
if (enableEdit === showEditorRef.current) return;
|
|
23
|
+
if (enableEdit && !showEditorRef.current) {
|
|
24
24
|
setTimeout(() => inputRef.current.focus());
|
|
25
25
|
}
|
|
26
|
-
}, [
|
|
26
|
+
}, [enableEdit]);
|
|
27
27
|
const onChange = (0, _react.useCallback)(event => {
|
|
28
28
|
const newValue = event.target.value;
|
|
29
29
|
if (newValue === value) return;
|
|
@@ -9,12 +9,9 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _isHotkey = _interopRequireDefault(require("is-hotkey"));
|
|
11
11
|
var _clickOutside = _interopRequireDefault(require("./click-outside"));
|
|
12
|
-
var _formatter = _interopRequireDefault(require("./formatter"));
|
|
13
12
|
var _fallbackEditor = _interopRequireDefault(require("./fallback-editor"));
|
|
14
13
|
var _normalEditor = _interopRequireDefault(require("./normal-editor"));
|
|
15
|
-
var _slateConvert = require("../../slate-convert");
|
|
16
14
|
var _getBrowserInfo = _interopRequireDefault(require("../../utils/get-browser-Info"));
|
|
17
|
-
var _extension = require("../../extension");
|
|
18
15
|
require("./index.css");
|
|
19
16
|
const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
20
17
|
let {
|
|
@@ -24,47 +21,29 @@ const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
|
|
|
24
21
|
value,
|
|
25
22
|
lang,
|
|
26
23
|
headerName,
|
|
27
|
-
|
|
24
|
+
onClick,
|
|
28
25
|
onSaveEditorValue,
|
|
29
26
|
editorApi
|
|
30
27
|
} = _ref;
|
|
31
|
-
const [
|
|
28
|
+
const [enableEdit, setEnableEdit] = (0, _react.useState)(false);
|
|
32
29
|
const valueRef = (0, _react.useRef)(typeof value === 'string' ? {
|
|
33
30
|
text: value
|
|
34
31
|
} : value);
|
|
35
32
|
const longTextValueChangedRef = (0, _react.useRef)(false);
|
|
36
|
-
const [focusNodePath, setFocusNodePath] = (0, _react.useState)([0, 0]);
|
|
37
33
|
const {
|
|
38
34
|
isWindowsWechat
|
|
39
35
|
} = (0, _react.useMemo)(() => {
|
|
40
36
|
return (0, _getBrowserInfo.default)(isCheckBrowser);
|
|
41
37
|
}, [isCheckBrowser]);
|
|
42
|
-
const openEditor = (0, _react.useCallback)(
|
|
43
|
-
|
|
44
|
-
setFocusNodePath(focusNodePath);
|
|
45
|
-
setShowEditor(true);
|
|
38
|
+
const openEditor = (0, _react.useCallback)(() => {
|
|
39
|
+
setEnableEdit(true);
|
|
46
40
|
}, []);
|
|
47
41
|
const closeEditor = (0, _react.useCallback)(() => {
|
|
48
42
|
if (longTextValueChangedRef.current) {
|
|
49
43
|
onSaveEditorValue(valueRef.current);
|
|
50
44
|
}
|
|
51
|
-
|
|
45
|
+
setEnableEdit(false);
|
|
52
46
|
}, [longTextValueChangedRef, valueRef, onSaveEditorValue]);
|
|
53
|
-
const getAttributeNode = (0, _react.useCallback)(function (node, attribute) {
|
|
54
|
-
let deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
|
|
55
|
-
if (!node || !node.getAttribute) return null;
|
|
56
|
-
if (deep === -1) return null;
|
|
57
|
-
if (node.getAttribute(attribute)) return node.getAttribute(attribute);
|
|
58
|
-
if (node.parentNode) return getAttributeNode(node.parentNode, attribute, deep--);
|
|
59
|
-
}, []);
|
|
60
|
-
const previewClick = (0, _react.useCallback)((event, richValue) => {
|
|
61
|
-
if (event.target.nodeName === 'A') return;
|
|
62
|
-
const nodeId = getAttributeNode(event.target, 'data-id');
|
|
63
|
-
onPreviewClick && onPreviewClick();
|
|
64
|
-
openEditor((0, _extension.getNodePathById)({
|
|
65
|
-
children: richValue
|
|
66
|
-
}, nodeId));
|
|
67
|
-
}, [onPreviewClick, openEditor, getAttributeNode]);
|
|
68
47
|
const onEditorValueChanged = (0, _react.useCallback)(value => {
|
|
69
48
|
valueRef.current = value;
|
|
70
49
|
longTextValueChangedRef.current = true;
|
|
@@ -85,29 +64,25 @@ const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
|
|
|
85
64
|
closeEditor: closeEditor
|
|
86
65
|
};
|
|
87
66
|
}, [openEditor, closeEditor]);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
onClick: event => previewClick(event, richValue)
|
|
93
|
-
}, valueRef.current.text && /*#__PURE__*/_react.default.createElement(_formatter.default, {
|
|
94
|
-
value: isWindowsWechat ? valueRef.current : richValue
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
67
|
+
const handelEnableEdit = (0, _react.useCallback)(() => {
|
|
68
|
+
onClick && onClick();
|
|
69
|
+
openEditor();
|
|
70
|
+
}, [openEditor, onClick]);
|
|
97
71
|
return /*#__PURE__*/_react.default.createElement(_clickOutside.default, {
|
|
98
72
|
onClickOutside: closeEditor
|
|
99
73
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
100
74
|
className: "w-100",
|
|
101
75
|
onKeyDown: onHotKey
|
|
102
76
|
}, isWindowsWechat ? /*#__PURE__*/_react.default.createElement(_fallbackEditor.default, {
|
|
103
|
-
|
|
77
|
+
enableEdit: enableEdit,
|
|
104
78
|
value: valueRef.current.text,
|
|
105
79
|
onChange: onEditorValueChanged,
|
|
106
80
|
closeEditor: closeEditor
|
|
107
81
|
}) : /*#__PURE__*/_react.default.createElement(_normalEditor.default, {
|
|
82
|
+
enableEdit: enableEdit,
|
|
83
|
+
handelEnableEdit: handelEnableEdit,
|
|
108
84
|
lang: lang,
|
|
109
85
|
headerName: headerName,
|
|
110
|
-
focusNodePath: focusNodePath,
|
|
111
86
|
value: valueRef.current.text,
|
|
112
87
|
autoSave: autoSave,
|
|
113
88
|
saveDelay: saveDelay,
|
|
@@ -11,9 +11,11 @@ var _simpleEditor = _interopRequireDefault(require("../simple-editor"));
|
|
|
11
11
|
var _getPreviewContent = _interopRequireDefault(require("../../utils/get-preview-content"));
|
|
12
12
|
var _markdownPreview = _interopRequireDefault(require("../markdown-preview"));
|
|
13
13
|
var _longtextEditorDialog = _interopRequireDefault(require("../longtext-editor-dialog"));
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
15
|
const NormalEditor = _ref => {
|
|
15
16
|
let {
|
|
16
|
-
|
|
17
|
+
enableEdit,
|
|
18
|
+
handelEnableEdit,
|
|
17
19
|
lang,
|
|
18
20
|
headerName,
|
|
19
21
|
value: propsValue,
|
|
@@ -95,15 +97,27 @@ const NormalEditor = _ref => {
|
|
|
95
97
|
timer && clearTimeout(timer);
|
|
96
98
|
};
|
|
97
99
|
}, [autoSave, saveDelay, handelAutoSave]);
|
|
100
|
+
if (!enableEdit && !valueRef.current.text) {
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
className: (0, _classnames.default)('sf-long-text-inline-editor-container', {
|
|
103
|
+
'preview': !enableEdit
|
|
104
|
+
}),
|
|
105
|
+
ref: editorContainerRef,
|
|
106
|
+
onClick: handelEnableEdit
|
|
107
|
+
});
|
|
108
|
+
}
|
|
98
109
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
-
className:
|
|
110
|
+
className: (0, _classnames.default)('sf-long-text-inline-editor-container', {
|
|
111
|
+
'preview': !enableEdit
|
|
112
|
+
}),
|
|
100
113
|
style: style,
|
|
101
114
|
ref: editorContainerRef
|
|
102
115
|
}, !showExpandEditor ? /*#__PURE__*/_react.default.createElement(_simpleEditor.default, {
|
|
103
116
|
ref: editorRef,
|
|
117
|
+
enableEdit: enableEdit,
|
|
104
118
|
isInline: true,
|
|
105
|
-
focusNodePath: focusNodePath,
|
|
106
119
|
value: valueRef.current.text,
|
|
120
|
+
handelEnableEdit: handelEnableEdit,
|
|
107
121
|
onSave: handelAutoSave,
|
|
108
122
|
editorApi: editorApi,
|
|
109
123
|
onContentChanged: onContentChanged,
|
package/package.json
CHANGED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
border-radius: 3px;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
padding: 16px 12px;
|
|
8
|
-
background-color: #FFF;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container .sf-slate-viewer-scroll-container {
|
|
12
|
-
overflow-y: auto;
|
|
13
|
-
height: fit-content;
|
|
14
|
-
padding: 0;
|
|
15
|
-
background: #fff;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container .sf-slate-viewer-article-container {
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
margin: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container .sf-slate-viewer-article-container .article {
|
|
25
|
-
padding: 0;
|
|
26
|
-
height: auto;
|
|
27
|
-
min-height: 100% !important;
|
|
28
|
-
border: 0;
|
|
29
|
-
color: #212529;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ol,
|
|
33
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ul {
|
|
34
|
-
padding-inline-start: 40px;
|
|
35
|
-
margin-bottom: 1em;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ol li a,
|
|
39
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ul li a {
|
|
40
|
-
word-break: break-all;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ul.contains-task-list,
|
|
44
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ol.contains-task-list {
|
|
45
|
-
padding-inline-start: 20px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ul li.task-list-item,
|
|
49
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container ol li.task-list-item {
|
|
50
|
-
min-height: 20px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container li.task-list-item input[type=checkbox] {
|
|
54
|
-
position: absolute;
|
|
55
|
-
left: -1.4em;
|
|
56
|
-
top: .4em;
|
|
57
|
-
display: inline-block;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container thead tr {
|
|
61
|
-
min-height: 42px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.sf-long-text-inline-editor-container.preview .longtext-preview-container tbody tr {
|
|
65
|
-
font-weight: normal;
|
|
66
|
-
min-height: 42px;
|
|
67
|
-
}
|
|
68
|
-
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _loading = _interopRequireDefault(require("../../../containers/loading"));
|
|
11
|
-
var _slateConvert = require("../../../slate-convert");
|
|
12
|
-
var _slateViewer = _interopRequireDefault(require("../../../editors/slate-viewer"));
|
|
13
|
-
require("./index.css");
|
|
14
|
-
// Windows old Wechat (3.0 or earlier) inner core is chrome 53 and don't support ECMA6, can't use seafile-editor markdownViewer
|
|
15
|
-
// Windows new Wechat (lastest version 3.3.5) support seafile-editor markdownViewer
|
|
16
|
-
// so use dangerouslySetInnerHTML to preview
|
|
17
|
-
class Formatter extends _react.default.PureComponent {
|
|
18
|
-
constructor(props) {
|
|
19
|
-
super(props);
|
|
20
|
-
(0, _defineProperty2.default)(this, "convertMarkdown", mdFile => {
|
|
21
|
-
_slateConvert.processor.process(mdFile).then(result => {
|
|
22
|
-
let innerHtml = String(result).replace(/<a /ig, '<a target="_blank" tabindex="-1"');
|
|
23
|
-
this.setState({
|
|
24
|
-
innerHtml
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
this.state = {
|
|
29
|
-
innerHtml: null
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
componentDidMount() {
|
|
33
|
-
const {
|
|
34
|
-
isWindowsWechat,
|
|
35
|
-
value
|
|
36
|
-
} = this.props;
|
|
37
|
-
if (isWindowsWechat) {
|
|
38
|
-
this.convertMarkdown(value);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
const {
|
|
43
|
-
isWindowsWechat,
|
|
44
|
-
value,
|
|
45
|
-
isShowOutline
|
|
46
|
-
} = this.props;
|
|
47
|
-
const {
|
|
48
|
-
innerHtml
|
|
49
|
-
} = this.state;
|
|
50
|
-
if (isWindowsWechat && innerHtml === null) {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_loading.default, null);
|
|
52
|
-
}
|
|
53
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
-
className: "longtext-preview-container"
|
|
55
|
-
}, isWindowsWechat && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
-
className: "article",
|
|
57
|
-
dangerouslySetInnerHTML: {
|
|
58
|
-
__html: this.state.innerHtml
|
|
59
|
-
}
|
|
60
|
-
}), !isWindowsWechat && /*#__PURE__*/_react.default.createElement(_slateViewer.default, {
|
|
61
|
-
value: value,
|
|
62
|
-
isShowOutline: isShowOutline
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
var _default = exports.default = Formatter;
|