@seafile/seafile-editor 0.3.144 → 0.3.146
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { Editor, Path } from 'slate';
|
|
4
|
+
import { Editor, Path, Range } from 'slate';
|
|
5
5
|
import ListUtils from '../editor-utils/block-element-utils/list-utils';
|
|
6
6
|
import CodeUtils from '../editor-utils/block-element-utils/code-utils';
|
|
7
7
|
import { isRangeCollapsed } from '../editor-utils/range-utils';
|
|
@@ -306,11 +306,19 @@ var withBlock = function withBlock(editor) {
|
|
|
306
306
|
codeUtils.unwrapCodeBlock();
|
|
307
307
|
break;
|
|
308
308
|
case 'exit_code_block':
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
if (editor.selection && !Range.isExpanded(editor.selection)) {
|
|
310
|
+
var _path2 = Editor.path(editor, editor.selection);
|
|
311
|
+
var p = {
|
|
312
|
+
type: 'paragraph',
|
|
313
|
+
children: [{
|
|
314
|
+
text: ''
|
|
315
|
+
}]
|
|
316
|
+
};
|
|
317
|
+
SfEditor.insertNodes(editor, p, {
|
|
318
|
+
at: [_path2[0] + 1]
|
|
319
|
+
});
|
|
320
|
+
SfEditor.select(editor, [_path2[0] + 1]);
|
|
321
|
+
}
|
|
314
322
|
break;
|
|
315
323
|
case 'increase_code_block_indent':
|
|
316
324
|
if (isRangeCollapsed(editor.selection)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.146",
|
|
4
4
|
"private": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "2.0.4",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"codemirror": "^5.37.0",
|
|
9
9
|
"deepmerge": "^2.1.0",
|
|
10
10
|
"detect-indent": "^4.0.0",
|
|
11
|
+
"glamor": "2.20.40",
|
|
11
12
|
"hast-util-sanitize": "^1.1.2",
|
|
12
13
|
"is-hotkey": "0.2.0",
|
|
13
14
|
"is-url": "^1.2.4",
|
|
@@ -93,7 +94,6 @@
|
|
|
93
94
|
"eslint-plugin-react-hooks": "^1.6.1",
|
|
94
95
|
"file-loader": "3.0.1",
|
|
95
96
|
"fs-extra": "7.0.1",
|
|
96
|
-
"glamor": "2.20.40",
|
|
97
97
|
"html-webpack-plugin": "^4.0.0-beta.5",
|
|
98
98
|
"i18next": "22.4.9",
|
|
99
99
|
"i18next-browser-languagedetector": "7.0.1",
|