@seafile/seafile-editor 1.0.4-2 → 1.0.4-3
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/simple-slate-editor /index.js +2 -2
- package/dist/editors/simple-slate-editor /style.css +72 -0
- package/dist/editors/slate-editor/index.js +1 -1
- package/dist/extension/toolbar/header-toolbar/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{assets/css/slate-editor.css → editors/slate-editor/style.css} +0 -0
|
@@ -6,7 +6,7 @@ import EventBus from '../../utils/event-bus';
|
|
|
6
6
|
import EventProxy from '../../utils/event-handler';
|
|
7
7
|
import withPropsEditor from './with-props-editor';
|
|
8
8
|
import { focusEditor } from '../../extension/core';
|
|
9
|
-
import '
|
|
9
|
+
import './style.css';
|
|
10
10
|
export default function SimpleSlateEditor(_ref) {
|
|
11
11
|
let {
|
|
12
12
|
value,
|
|
@@ -51,7 +51,7 @@ export default function SimpleSlateEditor(_ref) {
|
|
|
51
51
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
52
|
}, []);
|
|
53
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: "sf-slate-editor-container"
|
|
54
|
+
className: "sf-simple-slate-editor-container"
|
|
55
55
|
}, /*#__PURE__*/React.createElement(Toolbar, {
|
|
56
56
|
editor: editor,
|
|
57
57
|
isSupportFormula: isSupportFormula
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.sf-simple-slate-editor-container {
|
|
2
|
+
flex: 1;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
min-height: 0;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sf-simple-slate-editor-container .sf-slate-editor-toolbar {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
height: 44px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 0 10px;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
user-select: none;
|
|
17
|
+
border-bottom: 1px solid #e5e6e8;
|
|
18
|
+
position: relative;
|
|
19
|
+
z-index: 102;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sf-simple-slate-editor-container .sf-slate-editor-content {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: calc(100% - 44px);
|
|
25
|
+
display: flex;
|
|
26
|
+
background: #f5f5f5;
|
|
27
|
+
position: relative;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sf-simple-slate-editor-container .sf-slate-scroll-container,
|
|
32
|
+
.sf-simple-slate-editor-container .sf-slate-article-container {
|
|
33
|
+
height: 100%;
|
|
34
|
+
width: 100%;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* .sf-simple-slate-editor-container .sf-slate-article-container {
|
|
39
|
+
flex: 1;
|
|
40
|
+
position: relative;
|
|
41
|
+
max-width: 950px;
|
|
42
|
+
min-width: 400px;
|
|
43
|
+
margin: 0 auto;
|
|
44
|
+
padding-top: 20px;
|
|
45
|
+
padding-bottom: 20px;
|
|
46
|
+
} */
|
|
47
|
+
|
|
48
|
+
.sf-simple-slate-editor-container .sf-slate-editor-content .article {
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 10px;
|
|
51
|
+
height: 100%;
|
|
52
|
+
border: none;
|
|
53
|
+
background-color: #fff;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.sf-simple-slate-editor-container .sf-slate-editor-content .article div:first-child {
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sf-simple-slate-editor-container ::-webkit-scrollbar{
|
|
61
|
+
width: 8px;
|
|
62
|
+
height: 8px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sf-simple-slate-editor-container ::-webkit-scrollbar-button {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.sf-simple-slate-editor-container ::-webkit-scrollbar-thumb {
|
|
70
|
+
background-color: rgb(206, 206, 212);
|
|
71
|
+
border-radius: 10px;
|
|
72
|
+
}
|
|
@@ -8,7 +8,7 @@ import withPropsEditor from './with-props-editor';
|
|
|
8
8
|
import EditorHelp from './editor-help';
|
|
9
9
|
import { focusEditor } from '../../extension/core';
|
|
10
10
|
import { ScrollContext } from '../../hooks/use-scroll-context';
|
|
11
|
-
import '
|
|
11
|
+
import './style.css';
|
|
12
12
|
export default function SlateEditor(_ref) {
|
|
13
13
|
let {
|
|
14
14
|
value,
|
|
@@ -65,7 +65,7 @@ const Toolbar = _ref => {
|
|
|
65
65
|
};
|
|
66
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
67
67
|
className: "sf-slate-editor-toolbar"
|
|
68
|
-
}, /*#__PURE__*/React.createElement(MenuGroup, null), /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(HeaderMenu, commonProps)), /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(TextStyleMenu, Object.assign({}, commonProps, {
|
|
68
|
+
}, isRichEditor && /*#__PURE__*/React.createElement(MenuGroup, null), /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(HeaderMenu, commonProps)), /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(TextStyleMenu, Object.assign({}, commonProps, {
|
|
69
69
|
type: TEXT_STYLE_MAP.BOLD
|
|
70
70
|
})), /*#__PURE__*/React.createElement(TextStyleMenu, Object.assign({}, commonProps, {
|
|
71
71
|
type: TEXT_STYLE_MAP.ITALIC
|
package/package.json
CHANGED
|
File without changes
|