@seafile/seafile-editor 0.3.116 → 0.3.118

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.
@@ -0,0 +1,77 @@
1
+ .seatable-simple-editor {
2
+ flex: 1;
3
+ display: flex;
4
+ flex-direction: column;
5
+ height: 100%;
6
+ min-width: 768px;
7
+ overflow: hidden;
8
+ border: 1px solid #e5e5e5;
9
+ }
10
+
11
+ .seatable-simple-editor .seafile-editor-topbar {
12
+ width: 100%;
13
+ background-color: #fff;
14
+ border-bottom: 1px solid #e5e5e5;
15
+ box-shadow: 0 3px 2px -2px rgba(200,200,200,.15);
16
+ user-select: none;
17
+ position: relative;
18
+ z-index: 3;
19
+ display: flex;
20
+ justify-content: space-between;
21
+ }
22
+
23
+ .seatable-simple-editor .seafile-editor-topbar .use-help-icon {
24
+ background-color: #fff;
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ .seatable-simple-editor .seafile-editor-topbar .editor-btn-group {
29
+ height: 100%;
30
+ padding: 5px 0 5px 5px;
31
+ font-size: 0.75rem;
32
+ border-right: 1px solid #e5e5e5;
33
+ color: #555555;
34
+ }
35
+
36
+ .seatable-simple-editor .header-list-container {
37
+ border-left: 0;
38
+ }
39
+
40
+ .seatable-simple-editor .editor {
41
+ margin: 0;
42
+ padding: 10px;
43
+ height: 100%;
44
+ border: none;
45
+ }
46
+
47
+ /*set scroll bar*/
48
+ .editor-container::-webkit-scrollbar{
49
+ width: 8px;
50
+ height: 8px;
51
+ }
52
+
53
+ .editor-container::-webkit-scrollbar-button {
54
+ display: none;
55
+ }
56
+
57
+ .editor-container::-webkit-scrollbar-thumb {
58
+ background-color: rgb(206, 206, 212);
59
+ border-radius: 10px;
60
+ }
61
+
62
+ .editor-container {
63
+ /* this container is needed to show the scroll bar */
64
+ height: 100%;
65
+ overflow-y: auto;
66
+ flex: 1 1 auto;
67
+ position: relative;
68
+ }
69
+
70
+ .editor {
71
+ min-height: calc(100% - 40px);
72
+ background: #fff;
73
+ padding: 40px 60px;
74
+ margin: 20px 40px;
75
+ border: 1px solid rgb(230,230,221);
76
+ overflow-x: hidden;
77
+ }
@@ -53,7 +53,8 @@ var AddImageDialog = /*#__PURE__*/function (_React$PureComponent) {
53
53
  return /*#__PURE__*/React.createElement(Modal, {
54
54
  isOpen: true,
55
55
  toggle: this.props.onToggleImageDialog,
56
- className: this.props.className
56
+ className: this.props.className,
57
+ zIndex: 1071
57
58
  }, /*#__PURE__*/React.createElement(ModalHeader, {
58
59
  toggle: this.props.onToggleImageDialog
59
60
  }, this.props.t('insert_image')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
@@ -104,7 +104,8 @@ var AddLinkDialog = /*#__PURE__*/function (_React$PureComponent) {
104
104
  isOpen: true,
105
105
  autoFocus: false,
106
106
  toggle: this.props.toggleLinkDialog,
107
- className: this.props.className
107
+ className: this.props.className,
108
+ zIndex: 1071
108
109
  }, /*#__PURE__*/React.createElement(ModalHeader, {
109
110
  toggle: this.props.toggleLinkDialog
110
111
  }, this.props.t('insert_link')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
@@ -38,7 +38,7 @@ var ContextMenu = /*#__PURE__*/function (_React$Component) {
38
38
  contextStyle: {
39
39
  top: top,
40
40
  left: left,
41
- zIndex: '1051',
41
+ zIndex: '1071',
42
42
  display: 'block'
43
43
  }
44
44
  });
@@ -59,7 +59,8 @@ var KeyboardShortcuts = /*#__PURE__*/function (_React$PureComponent) {
59
59
  return /*#__PURE__*/React.createElement(Modal, {
60
60
  isOpen: true,
61
61
  toggle: toggleShortcutDialog,
62
- className: "keyboard-shortcut-dialog"
62
+ className: "keyboard-shortcut-dialog",
63
+ zIndex: 1071
63
64
  }, /*#__PURE__*/React.createElement(ModalHeader, {
64
65
  toggle: toggleShortcutDialog
65
66
  }, /*#__PURE__*/React.createElement("span", {
@@ -139,6 +139,7 @@ var withInline = function withInline(editor) {
139
139
  },
140
140
  at: editor.selection
141
141
  });
142
+ break;
142
143
 
143
144
  default:
144
145
  exec(command);
@@ -17,6 +17,7 @@ var EditorBuilder = /*#__PURE__*/function () {
17
17
  _classCallCheck(this, EditorBuilder);
18
18
 
19
19
  this.editor = null;
20
+ this.slateEditor = null;
20
21
  this.plugin = null;
21
22
  this.tableUtils = null;
22
23
  this.editorUtils = null;
@@ -59,14 +60,15 @@ var EditorBuilder = /*#__PURE__*/function () {
59
60
  }, {
60
61
  key: "getSlateEditor",
61
62
  value: function getSlateEditor() {
62
- if (this.editor) this.editor = null;
63
- this.editor = withInline(withVoid(withReact(createEditor())));
64
- return this.editor;
63
+ if (this.slateEditor) return this.slateEditor;
64
+ this.slateEditor = withInline(withVoid(withReact(createEditor())));
65
+ return this.slateEditor;
65
66
  }
66
67
  }, {
67
68
  key: "resetEditor",
68
69
  value: function resetEditor() {
69
70
  this.editor = null;
71
+ this.slateEditor = null;
70
72
  this.plugin = null;
71
73
  this.editorUtils = null;
72
74
  this.tableUtils = null;
@@ -269,7 +269,7 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component2) {
269
269
  imagePadding: 70,
270
270
  reactModalStyle: {
271
271
  overlay: {
272
- zIndex: 1051
272
+ zIndex: 1071
273
273
  }
274
274
  }
275
275
  });
@@ -56,7 +56,7 @@ var TextLinkHoverMenu = /*#__PURE__*/function (_React$Component) {
56
56
  }
57
57
 
58
58
  var style = _this.refDom.style;
59
- style.zIndex = '1050';
59
+ style.zIndex = '1071';
60
60
  style.top = "".concat(rect.top - 45, "px");
61
61
  var left = parseInt(rect.x - 125);
62
62
 
@@ -18,7 +18,7 @@ import EditorBuilder from './editor-builder';
18
18
  import AddLinkDialog from '../components/add-link-dialog';
19
19
  import ErrorBoundary from '../components/error-boundary';
20
20
  import './code-highlight-package';
21
- import '../assets/editor/simple-editor.css';
21
+ import '../assets/editor/seatable-editor.css';
22
22
  import '../assets/css/image.css';
23
23
  import '../assets/css/link.css';
24
24
  import '../assets/css/navbar-imgbutton.css';
@@ -171,7 +171,7 @@ var SeatableEditor = /*#__PURE__*/function (_React$Component) {
171
171
  var supportInsertColumn = canInsertColumn && columns.length > 0;
172
172
  var selectionCollapsed = isRangeCollapsed(editor.selection);
173
173
  return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement("div", {
174
- className: "seafile-simple-editor"
174
+ className: "seatable-simple-editor"
175
175
  }, /*#__PURE__*/React.createElement("div", {
176
176
  className: "seafile-editor-topbar"
177
177
  }, /*#__PURE__*/React.createElement(Toolbar, {
@@ -36,7 +36,7 @@ function stringify(config) {
36
36
  'span': ['className'],
37
37
  'div': ['className']
38
38
  },
39
- 'tagNames': ['input', 'code', 'span', 'div']
39
+ 'tagNames': ['input', 'code', 'span', 'div', 'blockquote', 'pre']
40
40
  });
41
41
  this.Compiler = compiler;
42
42
 
@@ -367,6 +367,15 @@ function _slateNodeToMD(node) {
367
367
  value: data.formula
368
368
  };
369
369
 
370
+ case 'column':
371
+ {
372
+ var _data = node.data;
373
+ var newNode = {
374
+ text: "{".concat(_data.name, "}")
375
+ };
376
+ return _text2MdNodes(newNode);
377
+ }
378
+
370
379
  default:
371
380
  // turn the block to paragraph default when it`s type is unknown
372
381
  mdNodes = parseChildren(node);
@@ -34,7 +34,7 @@ var ViewerImage = /*#__PURE__*/function (_React$Component) {
34
34
  onCloseRequest: _this.toggleBigImage,
35
35
  reactModalStyle: {
36
36
  overlay: {
37
- zIndex: 1051
37
+ zIndex: 1071
38
38
  }
39
39
  }
40
40
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "0.3.116",
3
+ "version": "0.3.118",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^0.0.9",