@seafile/seafile-editor 0.4.3 → 0.4.5
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/README.md +2 -1
- package/dist/components/load-script/index.js +1 -2
- package/dist/components/toast/toastManager.js +4 -0
- package/dist/containers/custom/split-nodes-at-point.js +1 -1
- package/dist/containers/editor-utils/block-element-utils/code-utils.js +6 -0
- package/dist/containers/editor-utils/block-element-utils/list-utils.js +11 -3
- package/dist/containers/editor-utils/text-utils.js +5 -8
- package/dist/editors/markdown-editor.js +1 -0
- package/dist/editors/plain-markdown-editor.js +4 -0
- package/dist/index.js +10 -36
- package/dist/utils/diff/compare-strings.js +1 -3
- package/dist/utils/diff/diff.js +2 -6
- package/dist/utils/utils.js +20 -20
- package/package.json +5 -6
- package/public/media/seafile-ui.css +11166 -6
- package/dist/assets/css/new-editor-toolbar.css +0 -52
- package/dist/assets/css/new-editor.css +0 -39
- package/dist/new-editors/editor.js +0 -77
- package/dist/slate-extension/constants/index.js +0 -49
- package/dist/slate-extension/core/index.js +0 -3
- package/dist/slate-extension/core/queries/index.js +0 -298
- package/dist/slate-extension/core/transforms/focus-editor.js +0 -11
- package/dist/slate-extension/core/transforms/index.js +0 -2
- package/dist/slate-extension/core/transforms/move-children.js +0 -28
- package/dist/slate-extension/core/utils/index.js +0 -17
- package/dist/slate-extension/index.js +0 -15
- package/dist/slate-extension/menu/index.js +0 -4
- package/dist/slate-extension/menu/menu-group.js +0 -27
- package/dist/slate-extension/menu/menu-item.js +0 -81
- package/dist/slate-extension/menu/menu.css +0 -34
- package/dist/slate-extension/plugins/blockquote/helpers.js +0 -49
- package/dist/slate-extension/plugins/blockquote/index.js +0 -14
- package/dist/slate-extension/plugins/blockquote/menu/index.js +0 -57
- package/dist/slate-extension/plugins/blockquote/model.js +0 -11
- package/dist/slate-extension/plugins/blockquote/plugin.js +0 -50
- package/dist/slate-extension/plugins/blockquote/render-elem.js +0 -7
- package/dist/slate-extension/plugins/check-list/helpers.js +0 -44
- package/dist/slate-extension/plugins/check-list/index.js +0 -7
- package/dist/slate-extension/plugins/check-list/menu/index.js +0 -56
- package/dist/slate-extension/plugins/check-list/model.js +0 -12
- package/dist/slate-extension/plugins/check-list/plugin.js +0 -50
- package/dist/slate-extension/plugins/check-list/render-elem.js +0 -67
- package/dist/slate-extension/plugins/header/helpers.js +0 -40
- package/dist/slate-extension/plugins/header/index.js +0 -10
- package/dist/slate-extension/plugins/header/menu/index.js +0 -115
- package/dist/slate-extension/plugins/header/plugin.js +0 -51
- package/dist/slate-extension/plugins/header/render-elem.js +0 -11
- package/dist/slate-extension/plugins/index.js +0 -8
- package/dist/slate-extension/plugins/list/helpers.js +0 -43
- package/dist/slate-extension/plugins/list/index.js +0 -11
- package/dist/slate-extension/plugins/list/menu/index.js +0 -69
- package/dist/slate-extension/plugins/list/model.js +0 -11
- package/dist/slate-extension/plugins/list/plugin/index.js +0 -34
- package/dist/slate-extension/plugins/list/plugin/insert-break-list.js +0 -23
- package/dist/slate-extension/plugins/list/plugin/normalize-list.js +0 -88
- package/dist/slate-extension/plugins/list/plugin/on-tab-handle.js +0 -45
- package/dist/slate-extension/plugins/list/queries/index.js +0 -47
- package/dist/slate-extension/plugins/list/render-elem.js +0 -22
- package/dist/slate-extension/plugins/list/transforms/index.js +0 -11
- package/dist/slate-extension/plugins/list/transforms/insert-list-item.js +0 -98
- package/dist/slate-extension/plugins/list/transforms/move-list-item-down.js +0 -46
- package/dist/slate-extension/plugins/list/transforms/move-list-item-up.js +0 -127
- package/dist/slate-extension/plugins/list/transforms/move-list-items-to-list.js +0 -56
- package/dist/slate-extension/plugins/list/transforms/move-list-items.js +0 -67
- package/dist/slate-extension/plugins/list/transforms/normalize-list-item.js +0 -123
- package/dist/slate-extension/plugins/list/transforms/normalize-nested-list.js +0 -33
- package/dist/slate-extension/plugins/list/transforms/remove-first-list-item.js +0 -17
- package/dist/slate-extension/plugins/list/transforms/toggle-list.js +0 -160
- package/dist/slate-extension/plugins/list/transforms/unwrap-list.js +0 -55
- package/dist/slate-extension/plugins/text-style/index.js +0 -5
- package/dist/slate-extension/plugins/text-style/model.js +0 -11
- package/dist/slate-extension/plugins/text-style/render-elem.js +0 -29
- package/dist/slate-extension/render/render-element.js +0 -62
- package/dist/slate-extension/render/render-leaf.js +0 -8
- package/dist/slate-extension/toolbar/index.js +0 -42
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import { Node, Range, Transforms, Element, Editor } from 'slate';
|
|
4
|
-
import { LIST_ITEM, LIST_LIC, PARAGRAPH } from '../../../constants';
|
|
5
|
-
import { findNode, getNodeEntries, getNodeType, getSelectedNodeEntryByType, isRangeAcrossBlocks } from '../../../core';
|
|
6
|
-
import { getListItemEntry, getListTypes } from '../queries';
|
|
7
|
-
import { unwrapList } from './unwrap-list';
|
|
8
|
-
var wrapLineList = function wrapLineList(editor, type) {
|
|
9
|
-
var nodeEntry = getSelectedNodeEntryByType(editor, PARAGRAPH);
|
|
10
|
-
var _nodeEntry = _slicedToArray(nodeEntry, 2),
|
|
11
|
-
node = _nodeEntry[0],
|
|
12
|
-
path = _nodeEntry[1];
|
|
13
|
-
if (node.type !== LIST_LIC) {
|
|
14
|
-
Transforms.setNodes(editor, {
|
|
15
|
-
type: LIST_LIC
|
|
16
|
-
}, {
|
|
17
|
-
at: path
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
Transforms.wrapNodes(editor, {
|
|
21
|
-
type: LIST_ITEM,
|
|
22
|
-
children: []
|
|
23
|
-
}, {
|
|
24
|
-
at: path
|
|
25
|
-
});
|
|
26
|
-
Transforms.wrapNodes(editor, {
|
|
27
|
-
type: type,
|
|
28
|
-
children: []
|
|
29
|
-
}, {
|
|
30
|
-
at: path
|
|
31
|
-
});
|
|
32
|
-
return;
|
|
33
|
-
};
|
|
34
|
-
var wrapRangeList = function wrapRangeList(editor, type) {
|
|
35
|
-
// 选中的是一个区间
|
|
36
|
-
Editor.withoutNormalizing(editor, function () {
|
|
37
|
-
// 1. 获取公共祖先
|
|
38
|
-
var _Range$edges = Range.edges(editor.selection),
|
|
39
|
-
_Range$edges2 = _slicedToArray(_Range$edges, 2),
|
|
40
|
-
startPoint = _Range$edges2[0],
|
|
41
|
-
endPoint = _Range$edges2[1];
|
|
42
|
-
var commonAncestor = Node.common(editor, startPoint.path, endPoint.path);
|
|
43
|
-
var listTypes = getListTypes();
|
|
44
|
-
|
|
45
|
-
// 2. 公共祖先如果是 ordered_list | unordered_list
|
|
46
|
-
if (listTypes.includes(commonAncestor[0].type) || commonAncestor[0].type === LIST_ITEM) {
|
|
47
|
-
if (commonAncestor[0].type !== type) {
|
|
48
|
-
var start = Range.start(editor.selection);
|
|
49
|
-
var end = Range.end(editor.selection);
|
|
50
|
-
var options = {
|
|
51
|
-
at: start,
|
|
52
|
-
match: {
|
|
53
|
-
type: listTypes
|
|
54
|
-
},
|
|
55
|
-
mode: 'lowest'
|
|
56
|
-
};
|
|
57
|
-
var startList = findNode(editor, options);
|
|
58
|
-
var endList = findNode(editor, _objectSpread(_objectSpread({}, options), {
|
|
59
|
-
at: end
|
|
60
|
-
}));
|
|
61
|
-
var rangeLength = Math.min(startList[1].length, endList[1].length);
|
|
62
|
-
Transforms.setNodes(editor, {
|
|
63
|
-
type: type
|
|
64
|
-
}, {
|
|
65
|
-
at: editor.selection,
|
|
66
|
-
match: function match(n, path) {
|
|
67
|
-
return Element.isElement(n) && listTypes.includes(n.type) && path.length >= rangeLength;
|
|
68
|
-
},
|
|
69
|
-
mode: 'all'
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
unwrapList(editor);
|
|
73
|
-
}
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// 获取选中的所有节点的子元素
|
|
78
|
-
var rootPathLength = commonAncestor[1].length;
|
|
79
|
-
var _nodes = getNodeEntries(editor, {
|
|
80
|
-
mode: 'all'
|
|
81
|
-
});
|
|
82
|
-
var nodes = Array.from(_nodes).filter(function (_ref) {
|
|
83
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
84
|
-
path = _ref2[1];
|
|
85
|
-
return path.length === rootPathLength + 1;
|
|
86
|
-
});
|
|
87
|
-
nodes.forEach(function (n) {
|
|
88
|
-
if (listTypes.includes(n[0].type)) {
|
|
89
|
-
Transforms.setNodes(editor, {
|
|
90
|
-
type: type
|
|
91
|
-
}, {
|
|
92
|
-
at: n[1],
|
|
93
|
-
match: function match(_n) {
|
|
94
|
-
return Element.isElement(_n) && listTypes.includes(_n.type);
|
|
95
|
-
},
|
|
96
|
-
mode: 'all'
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
if (![LIST_LIC].includes(n[0].type)) {
|
|
100
|
-
Transforms.setNodes(editor, {
|
|
101
|
-
type: LIST_LIC
|
|
102
|
-
}, {
|
|
103
|
-
at: n[1]
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
var listItem = {
|
|
107
|
-
type: LIST_ITEM,
|
|
108
|
-
children: []
|
|
109
|
-
};
|
|
110
|
-
Transforms.wrapNodes(editor, listItem, {
|
|
111
|
-
at: n[1]
|
|
112
|
-
});
|
|
113
|
-
var list = {
|
|
114
|
-
type: type,
|
|
115
|
-
children: []
|
|
116
|
-
};
|
|
117
|
-
Transforms.wrapNodes(editor, list, {
|
|
118
|
-
at: n[1]
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
var toggleList = function toggleList(editor, type) {
|
|
125
|
-
Editor.withoutNormalizing(editor, function () {
|
|
126
|
-
var selection = editor.selection;
|
|
127
|
-
if (!selection) return false;
|
|
128
|
-
|
|
129
|
-
// selection is collapsed, anchor === focus
|
|
130
|
-
// selection is in one block
|
|
131
|
-
if (Range.isCollapsed(selection) || !isRangeAcrossBlocks(editor)) {
|
|
132
|
-
var res = getListItemEntry(editor);
|
|
133
|
-
if (res) {
|
|
134
|
-
var list = res.list;
|
|
135
|
-
// 选中内容的类型是另一个类型, 如: select_type: ordered_list, 将被切换为 unordered_list
|
|
136
|
-
if (list[0].type !== type) {
|
|
137
|
-
var match = function match(n) {
|
|
138
|
-
return getListTypes().includes(getNodeType(n));
|
|
139
|
-
};
|
|
140
|
-
Transforms.setNodes(editor, {
|
|
141
|
-
type: type
|
|
142
|
-
}, {
|
|
143
|
-
at: editor.selection,
|
|
144
|
-
match: match,
|
|
145
|
-
mode: 'lowest'
|
|
146
|
-
});
|
|
147
|
-
} else {
|
|
148
|
-
unwrapList(editor);
|
|
149
|
-
}
|
|
150
|
-
} else {
|
|
151
|
-
wrapLineList(editor, type);
|
|
152
|
-
}
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// selection is a range
|
|
157
|
-
wrapRangeList(editor, type);
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
export default toggleList;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Editor, Transforms, Element, Node } from 'slate';
|
|
2
|
-
import { LIST_ITEM, LIST_LIC, PARAGRAPH } from '../../../constants';
|
|
3
|
-
import { getAboveBlockNode, getAboveNode, getNodeType } from '../../../core';
|
|
4
|
-
import { getListTypes } from '../queries';
|
|
5
|
-
export var unwrapList = function unwrapList(editor) {
|
|
6
|
-
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
7
|
-
at = _ref.at;
|
|
8
|
-
var ancestorListTypeCheck = function ancestorListTypeCheck() {
|
|
9
|
-
if (getAboveNode(editor, {
|
|
10
|
-
match: {
|
|
11
|
-
type: getListTypes()
|
|
12
|
-
}
|
|
13
|
-
})) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// The selection's common node might be a list type
|
|
18
|
-
if (!at && editor.selection) {
|
|
19
|
-
var commonNode = Node.common(editor, editor.selection.anchor.path, editor.selection.focus.path);
|
|
20
|
-
if (Element.isElement(commonNode[0]) && getListTypes().includes(commonNode[0].type)) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return false;
|
|
25
|
-
};
|
|
26
|
-
Editor.withoutNormalizing(editor, function () {
|
|
27
|
-
do {
|
|
28
|
-
var licEntry = getAboveBlockNode(editor, {
|
|
29
|
-
at: at,
|
|
30
|
-
match: {
|
|
31
|
-
type: LIST_LIC
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
if (licEntry) {
|
|
35
|
-
Transforms.setNodes(editor, {
|
|
36
|
-
type: PARAGRAPH
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
Transforms.unwrapNodes(editor, {
|
|
40
|
-
at: at,
|
|
41
|
-
match: function match(n) {
|
|
42
|
-
return getNodeType(n) === LIST_ITEM;
|
|
43
|
-
},
|
|
44
|
-
split: true
|
|
45
|
-
});
|
|
46
|
-
Transforms.unwrapNodes(editor, {
|
|
47
|
-
at: at,
|
|
48
|
-
match: function match(n) {
|
|
49
|
-
return getListTypes().includes(getNodeType(n));
|
|
50
|
-
},
|
|
51
|
-
split: true
|
|
52
|
-
});
|
|
53
|
-
} while (ancestorListTypeCheck());
|
|
54
|
-
});
|
|
55
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import { BLOCKQUOTE } from '../../constants';
|
|
4
|
-
var Blockquote = /*#__PURE__*/_createClass(function Blockquote(options) {
|
|
5
|
-
_classCallCheck(this, Blockquote);
|
|
6
|
-
this.type = options.type || BLOCKQUOTE;
|
|
7
|
-
this.children = options.children || [{
|
|
8
|
-
text: ''
|
|
9
|
-
}];
|
|
10
|
-
});
|
|
11
|
-
export default Blockquote;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
var renderText = function renderText(props, editor) {
|
|
3
|
-
var attributes = props.attributes,
|
|
4
|
-
children = props.children,
|
|
5
|
-
leaf = props.leaf;
|
|
6
|
-
var markedChildren = React.cloneElement(children);
|
|
7
|
-
if (leaf.BOLD) {
|
|
8
|
-
markedChildren = /*#__PURE__*/React.createElement("strong", null, markedChildren);
|
|
9
|
-
}
|
|
10
|
-
if (leaf.CODE) {
|
|
11
|
-
markedChildren = /*#__PURE__*/React.createElement("code", null, markedChildren);
|
|
12
|
-
}
|
|
13
|
-
if (leaf.ITALIC) {
|
|
14
|
-
markedChildren = /*#__PURE__*/React.createElement("i", null, markedChildren);
|
|
15
|
-
}
|
|
16
|
-
if (leaf.DELETE) {
|
|
17
|
-
markedChildren = /*#__PURE__*/React.createElement("del", null, markedChildren);
|
|
18
|
-
}
|
|
19
|
-
if (leaf.ADD) {
|
|
20
|
-
markedChildren = /*#__PURE__*/React.createElement("ins", null, markedChildren);
|
|
21
|
-
}
|
|
22
|
-
if (leaf.decoration) {
|
|
23
|
-
markedChildren = /*#__PURE__*/React.createElement("span", {
|
|
24
|
-
className: "token ".concat(leaf.type)
|
|
25
|
-
}, markedChildren);
|
|
26
|
-
}
|
|
27
|
-
return /*#__PURE__*/React.createElement("span", attributes, markedChildren);
|
|
28
|
-
};
|
|
29
|
-
export default renderText;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BLOCKQUOTE, CHECK_LIST_ITEM, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, LIST_ITEM, LIST_LIC, ORDERED_LIST, PARAGRAPH, UNORDERED_LIST } from '../constants';
|
|
4
|
-
import { BlockquotePlugin, CheckListPlugin, HeaderPlugin, ListPlugin } from '../plugins';
|
|
5
|
-
var renderElement = function renderElement(props, editor) {
|
|
6
|
-
var attributes = props.attributes,
|
|
7
|
-
children = props.children,
|
|
8
|
-
element = props.element;
|
|
9
|
-
switch (element.type) {
|
|
10
|
-
case PARAGRAPH:
|
|
11
|
-
return /*#__PURE__*/React.createElement("p", attributes, children);
|
|
12
|
-
case HEADER1:
|
|
13
|
-
case HEADER2:
|
|
14
|
-
case HEADER3:
|
|
15
|
-
case HEADER4:
|
|
16
|
-
case HEADER5:
|
|
17
|
-
case HEADER6:
|
|
18
|
-
{
|
|
19
|
-
var _HeaderPlugin$renderE = _slicedToArray(HeaderPlugin.renderElements, 1),
|
|
20
|
-
renderHeader = _HeaderPlugin$renderE[0];
|
|
21
|
-
return renderHeader(props, editor);
|
|
22
|
-
}
|
|
23
|
-
case BLOCKQUOTE:
|
|
24
|
-
{
|
|
25
|
-
var _BlockquotePlugin$ren = _slicedToArray(BlockquotePlugin.renderElements, 1),
|
|
26
|
-
renderBlockquote = _BlockquotePlugin$ren[0];
|
|
27
|
-
return renderBlockquote(props, editor);
|
|
28
|
-
}
|
|
29
|
-
case ORDERED_LIST:
|
|
30
|
-
case UNORDERED_LIST:
|
|
31
|
-
{
|
|
32
|
-
var _ListPlugin$renderEle = _slicedToArray(ListPlugin.renderElements, 1),
|
|
33
|
-
renderList = _ListPlugin$renderEle[0];
|
|
34
|
-
return renderList(props, editor);
|
|
35
|
-
}
|
|
36
|
-
case LIST_ITEM:
|
|
37
|
-
{
|
|
38
|
-
var _ListPlugin$renderEle2 = _slicedToArray(ListPlugin.renderElements, 2),
|
|
39
|
-
renderListItem = _ListPlugin$renderEle2[1];
|
|
40
|
-
return renderListItem(props, editor);
|
|
41
|
-
}
|
|
42
|
-
case LIST_LIC:
|
|
43
|
-
{
|
|
44
|
-
var _ListPlugin$renderEle3 = _slicedToArray(ListPlugin.renderElements, 3),
|
|
45
|
-
renderListLic = _ListPlugin$renderEle3[2];
|
|
46
|
-
return renderListLic(props, editor);
|
|
47
|
-
}
|
|
48
|
-
case CHECK_LIST_ITEM:
|
|
49
|
-
{
|
|
50
|
-
var _CheckListPlugin$rend = _slicedToArray(CheckListPlugin.renderElements, 2),
|
|
51
|
-
CheckListItem = _CheckListPlugin$rend[1];
|
|
52
|
-
return /*#__PURE__*/React.createElement(CheckListItem, Object.assign({}, props, {
|
|
53
|
-
editor: editor
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
default:
|
|
57
|
-
{
|
|
58
|
-
return /*#__PURE__*/React.createElement("p", attributes, children);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
export default renderElement;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import { TextPlugin } from '../plugins';
|
|
3
|
-
var renderLeaf = function renderLeaf(props, editor) {
|
|
4
|
-
var _TextPlugin$renderEle = _slicedToArray(TextPlugin.renderElements, 1),
|
|
5
|
-
renderText = _TextPlugin$renderEle[0];
|
|
6
|
-
return renderText(props, editor);
|
|
7
|
-
};
|
|
8
|
-
export default renderLeaf;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import QuoteMenu from '../plugins/blockquote/menu';
|
|
7
|
-
import ListMenu from '../plugins/list/menu';
|
|
8
|
-
import { ORDERED_LIST, UNORDERED_LIST } from '../constants';
|
|
9
|
-
import HeaderMenu from '../plugins/header/menu';
|
|
10
|
-
import CheckListMenu from '../plugins/check-list/menu';
|
|
11
|
-
import { MenuGroup } from '../menu';
|
|
12
|
-
import '../../assets/css/new-editor-toolbar.css';
|
|
13
|
-
var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(Toolbar, _React$Component);
|
|
15
|
-
var _super = _createSuper(Toolbar);
|
|
16
|
-
function Toolbar() {
|
|
17
|
-
_classCallCheck(this, Toolbar);
|
|
18
|
-
return _super.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
_createClass(Toolbar, [{
|
|
21
|
-
key: "render",
|
|
22
|
-
value: function render() {
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: "sf-editor-toolbar"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(HeaderMenu, {
|
|
26
|
-
editor: this.props.editor
|
|
27
|
-
}), /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(QuoteMenu, {
|
|
28
|
-
editor: this.props.editor
|
|
29
|
-
}), /*#__PURE__*/React.createElement(ListMenu, {
|
|
30
|
-
editor: this.props.editor,
|
|
31
|
-
type: UNORDERED_LIST
|
|
32
|
-
}), /*#__PURE__*/React.createElement(ListMenu, {
|
|
33
|
-
editor: this.props.editor,
|
|
34
|
-
type: ORDERED_LIST
|
|
35
|
-
}), /*#__PURE__*/React.createElement(CheckListMenu, {
|
|
36
|
-
editor: this.props.editor
|
|
37
|
-
})));
|
|
38
|
-
}
|
|
39
|
-
}]);
|
|
40
|
-
return Toolbar;
|
|
41
|
-
}(React.Component);
|
|
42
|
-
export default Toolbar;
|