@gravity-ui/markdown-editor 14.4.0 → 14.5.1
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/build/cjs/bundle/Editor.js +1 -0
- package/build/cjs/bundle/config/markup.d.ts +41 -17
- package/build/cjs/bundle/config/markup.js +413 -308
- package/build/cjs/bundle/config/wysiwyg.d.ts +29 -18
- package/build/cjs/bundle/config/wysiwyg.js +526 -310
- package/build/cjs/bundle/sticky/sticky.css +1 -1
- package/build/cjs/bundle/types.d.ts +2 -0
- package/build/cjs/extensions/behavior/Clipboard/utils.d.ts +1 -0
- package/build/cjs/extensions/behavior/Clipboard/utils.js +1 -0
- package/build/cjs/extensions/markdown/CodeBlock/handle-paste.js +5 -17
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/const.d.ts +7 -0
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/const.js +8 -1
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/index.d.ts +1 -1
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/index.js +2 -1
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/schema.d.ts +1 -1
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/schema.js +7 -7
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/serializer.d.ts +1 -1
- package/build/cjs/extensions/yfm/Checkbox/CheckboxSpecs/serializer.js +2 -2
- package/build/cjs/extensions/yfm/Checkbox/const.d.ts +1 -1
- package/build/cjs/extensions/yfm/Checkbox/const.js +2 -1
- package/build/cjs/extensions/yfm/Checkbox/index.d.ts +2 -2
- package/build/cjs/extensions/yfm/Checkbox/index.js +4 -38
- package/build/cjs/extensions/yfm/Checkbox/nodeviews.d.ts +16 -0
- package/build/cjs/extensions/yfm/Checkbox/nodeviews.js +56 -0
- package/build/cjs/extensions/yfm/YfmFile/YfmFileSpecs/const.d.ts +12 -0
- package/build/cjs/extensions/yfm/YfmFile/YfmFileSpecs/const.js +21 -2
- package/build/cjs/extensions/yfm/YfmFile/YfmFileSpecs/index.d.ts +8 -1
- package/build/cjs/extensions/yfm/YfmFile/YfmFileSpecs/index.js +29 -5
- package/build/cjs/markup/codemirror/create.d.ts +1 -0
- package/build/cjs/markup/codemirror/create.js +41 -4
- package/build/cjs/markup/codemirror/html-to-markdown/converters.d.ts +111 -0
- package/build/cjs/markup/codemirror/html-to-markdown/converters.js +214 -0
- package/build/cjs/markup/codemirror/html-to-markdown/handlers.d.ts +104 -0
- package/build/cjs/markup/codemirror/html-to-markdown/handlers.js +233 -0
- package/build/cjs/markup/codemirror/html-to-markdown/helpers.d.ts +1 -0
- package/build/cjs/markup/codemirror/html-to-markdown/helpers.js +21 -0
- package/build/cjs/markup/commands/inline.js +18 -8
- package/build/cjs/utils/clipboard.d.ts +14 -0
- package/build/cjs/utils/clipboard.js +36 -1
- package/build/cjs/version.js +1 -1
- package/build/esm/bundle/Editor.js +1 -0
- package/build/esm/bundle/config/markup.d.ts +41 -17
- package/build/esm/bundle/config/markup.js +411 -307
- package/build/esm/bundle/config/wysiwyg.d.ts +29 -18
- package/build/esm/bundle/config/wysiwyg.js +499 -284
- package/build/esm/bundle/sticky/sticky.css +1 -1
- package/build/esm/bundle/types.d.ts +2 -0
- package/build/esm/extensions/behavior/Clipboard/utils.d.ts +1 -0
- package/build/esm/extensions/behavior/Clipboard/utils.js +1 -0
- package/build/esm/extensions/markdown/CodeBlock/handle-paste.js +2 -14
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/const.d.ts +7 -0
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/const.js +7 -0
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/index.d.ts +1 -1
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/index.js +1 -1
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/schema.d.ts +1 -1
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/schema.js +7 -7
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/serializer.d.ts +1 -1
- package/build/esm/extensions/yfm/Checkbox/CheckboxSpecs/serializer.js +2 -2
- package/build/esm/extensions/yfm/Checkbox/const.d.ts +1 -1
- package/build/esm/extensions/yfm/Checkbox/const.js +1 -1
- package/build/esm/extensions/yfm/Checkbox/index.d.ts +2 -2
- package/build/esm/extensions/yfm/Checkbox/index.js +3 -38
- package/build/esm/extensions/yfm/Checkbox/nodeviews.d.ts +16 -0
- package/build/esm/extensions/yfm/Checkbox/nodeviews.js +52 -0
- package/build/esm/extensions/yfm/YfmFile/YfmFileSpecs/const.d.ts +12 -0
- package/build/esm/extensions/yfm/YfmFile/YfmFileSpecs/const.js +21 -2
- package/build/esm/extensions/yfm/YfmFile/YfmFileSpecs/index.d.ts +8 -1
- package/build/esm/extensions/yfm/YfmFile/YfmFileSpecs/index.js +29 -6
- package/build/esm/markup/codemirror/create.d.ts +1 -0
- package/build/esm/markup/codemirror/create.js +40 -3
- package/build/esm/markup/codemirror/html-to-markdown/converters.d.ts +111 -0
- package/build/esm/markup/codemirror/html-to-markdown/converters.js +210 -0
- package/build/esm/markup/codemirror/html-to-markdown/handlers.d.ts +104 -0
- package/build/esm/markup/codemirror/html-to-markdown/handlers.js +215 -0
- package/build/esm/markup/codemirror/html-to-markdown/helpers.d.ts +1 -0
- package/build/esm/markup/codemirror/html-to-markdown/helpers.js +17 -0
- package/build/esm/markup/commands/inline.js +18 -8
- package/build/esm/utils/clipboard.d.ts +14 -0
- package/build/esm/utils/clipboard.js +32 -0
- package/build/esm/version.js +1 -1
- package/build/styles.css +1 -1
- package/package.json +9 -7
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.wToolbarConfig = exports.wBiusGroupConfig = exports.wHistoryGroupConfig = exports.wHiddenData = exports.wCommandMenuConfig = exports.wMathListConfig = exports.wCodeListConfig = exports.wListMoveListConfig = exports.wListsListConfig = exports.wHeadingListConfig = exports.wLiftListItemData = exports.wSinkListItemData = exports.wOrderedListItemData = exports.wBulletListItemData = exports.wHeading6ItemData = exports.wHeading5ItemData = exports.wHeading4ItemData = exports.wHeading3ItemData = exports.wHeading2ItemData = exports.wHeading1ItemData = exports.wTextItemData = exports.wMathListItem = exports.textContextItemData = exports.wToggleHeadingFoldingItemData = exports.wEmojiItemData = exports.wHruleItemData = exports.wCodeBlockItemData = exports.wMermaidItemData = exports.wGptItemData = exports.wYfmHtmlBlockItemData = exports.wMathBlockItemData = exports.wMathInlineItemData = exports.wTabsItemData = exports.wFileItemData = exports.wImageItemData = exports.wCodeItemData = exports.wTableItemData = exports.wNoteItemData = exports.wCutItemData = exports.wQuoteItemData = exports.wLinkItemData = exports.wCheckboxItemData = exports.wMarkedItemData = exports.wMonospaceItemData = exports.wStrikethroughItemData = exports.wUnderlineItemData = exports.wItalicItemData = exports.wBoldItemData = exports.wRedoItemData = exports.wUndoItemData = void 0;
|
|
4
|
+
exports.wSelectionMenuConfigByPreset = exports.wHiddenDataByPreset = exports.wCommandMenuConfigByPreset = exports.wToolbarConfigByPreset = exports.wSelectionMenuConfig = void 0;
|
|
4
5
|
const extensions_1 = require("../../extensions");
|
|
5
6
|
const constants_1 = require("../../extensions/additional/GPT/constants");
|
|
6
7
|
const hints_1 = require("../../i18n/hints");
|
|
7
8
|
const menubar_1 = require("../../i18n/menubar");
|
|
8
9
|
const shortcuts_1 = require("../../shortcuts");
|
|
9
|
-
const
|
|
10
|
+
const toolbar_1 = require("../../toolbar");
|
|
10
11
|
const WToolbarColors_1 = require("../toolbar/wysiwyg/WToolbarColors");
|
|
11
12
|
const WToolbarTextSelect_1 = require("../toolbar/wysiwyg/WToolbarTextSelect");
|
|
12
13
|
const action_names_1 = require("./action-names");
|
|
13
14
|
const icons_1 = require("./icons");
|
|
14
|
-
exports.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
];
|
|
38
|
-
/** Bold, Italic, Underline, Strike buttons group */
|
|
15
|
+
exports.wUndoItemData = {
|
|
16
|
+
id: action_names_1.ActionName.undo,
|
|
17
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
18
|
+
title: menubar_1.i18n.bind(null, 'undo'),
|
|
19
|
+
icon: icons_1.icons.undo,
|
|
20
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Undo),
|
|
21
|
+
hintWhenDisabled: false,
|
|
22
|
+
exec: (e) => e.actions.undo.run(),
|
|
23
|
+
isActive: (e) => e.actions.undo.isActive(),
|
|
24
|
+
isEnable: (e) => e.actions.undo.isEnable(),
|
|
25
|
+
};
|
|
26
|
+
exports.wRedoItemData = {
|
|
27
|
+
id: action_names_1.ActionName.redo,
|
|
28
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
29
|
+
title: menubar_1.i18n.bind(null, 'redo'),
|
|
30
|
+
icon: icons_1.icons.redo,
|
|
31
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Redo),
|
|
32
|
+
hintWhenDisabled: false,
|
|
33
|
+
exec: (e) => e.actions.redo.run(),
|
|
34
|
+
isActive: (e) => e.actions.redo.isActive(),
|
|
35
|
+
isEnable: (e) => e.actions.redo.isEnable(),
|
|
36
|
+
};
|
|
37
|
+
// ----
|
|
39
38
|
exports.wBoldItemData = {
|
|
40
39
|
id: action_names_1.ActionName.bold,
|
|
41
|
-
type:
|
|
40
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
42
41
|
title: menubar_1.i18n.bind(null, 'bold'),
|
|
43
42
|
icon: icons_1.icons.bold,
|
|
44
43
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Bold),
|
|
@@ -48,7 +47,7 @@ exports.wBoldItemData = {
|
|
|
48
47
|
};
|
|
49
48
|
exports.wItalicItemData = {
|
|
50
49
|
id: action_names_1.ActionName.italic,
|
|
51
|
-
type:
|
|
50
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
52
51
|
title: menubar_1.i18n.bind(null, 'italic'),
|
|
53
52
|
icon: icons_1.icons.italic,
|
|
54
53
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Italic),
|
|
@@ -58,7 +57,7 @@ exports.wItalicItemData = {
|
|
|
58
57
|
};
|
|
59
58
|
exports.wUnderlineItemData = {
|
|
60
59
|
id: action_names_1.ActionName.underline,
|
|
61
|
-
type:
|
|
60
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
62
61
|
title: menubar_1.i18n.bind(null, 'underline'),
|
|
63
62
|
icon: icons_1.icons.underline,
|
|
64
63
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Underline),
|
|
@@ -68,7 +67,7 @@ exports.wUnderlineItemData = {
|
|
|
68
67
|
};
|
|
69
68
|
exports.wStrikethroughItemData = {
|
|
70
69
|
id: action_names_1.ActionName.strike,
|
|
71
|
-
type:
|
|
70
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
72
71
|
title: menubar_1.i18n.bind(null, 'strike'),
|
|
73
72
|
icon: icons_1.icons.strikethrough,
|
|
74
73
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Strike),
|
|
@@ -78,7 +77,7 @@ exports.wStrikethroughItemData = {
|
|
|
78
77
|
};
|
|
79
78
|
exports.wMonospaceItemData = {
|
|
80
79
|
id: action_names_1.ActionName.mono,
|
|
81
|
-
type:
|
|
80
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
82
81
|
title: menubar_1.i18n.bind(null, 'mono'),
|
|
83
82
|
icon: icons_1.icons.mono,
|
|
84
83
|
exec: (e) => e.actions.mono.run(),
|
|
@@ -87,141 +86,17 @@ exports.wMonospaceItemData = {
|
|
|
87
86
|
};
|
|
88
87
|
exports.wMarkedItemData = {
|
|
89
88
|
id: action_names_1.ActionName.mark,
|
|
90
|
-
type:
|
|
89
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
91
90
|
title: menubar_1.i18n.bind(null, 'mark'),
|
|
92
91
|
icon: icons_1.icons.mark,
|
|
93
92
|
exec: (e) => e.actions.mark.run(),
|
|
94
93
|
isActive: (e) => e.actions.mark.isActive(),
|
|
95
94
|
isEnable: (e) => e.actions.mark.isEnable(),
|
|
96
95
|
};
|
|
97
|
-
|
|
98
|
-
exports.wBoldItemData,
|
|
99
|
-
exports.wItalicItemData,
|
|
100
|
-
exports.wUnderlineItemData,
|
|
101
|
-
exports.wStrikethroughItemData,
|
|
102
|
-
exports.wMonospaceItemData,
|
|
103
|
-
exports.wMarkedItemData,
|
|
104
|
-
];
|
|
105
|
-
exports.wTextItemData = {
|
|
106
|
-
id: action_names_1.ActionName.paragraph,
|
|
107
|
-
title: menubar_1.i18n.bind(null, 'text'),
|
|
108
|
-
icon: icons_1.icons.text,
|
|
109
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Text),
|
|
110
|
-
exec: (e) => e.actions.toParagraph.run(),
|
|
111
|
-
isActive: (e) => e.actions.toParagraph.isActive(),
|
|
112
|
-
isEnable: (e) => e.actions.toParagraph.isEnable(),
|
|
113
|
-
doNotActivateList: true,
|
|
114
|
-
};
|
|
115
|
-
exports.wHeadingListConfig = {
|
|
116
|
-
icon: icons_1.icons.headline,
|
|
117
|
-
withArrow: true,
|
|
118
|
-
title: menubar_1.i18n.bind(null, 'heading'),
|
|
119
|
-
data: [
|
|
120
|
-
exports.wTextItemData,
|
|
121
|
-
{
|
|
122
|
-
id: action_names_1.ActionName.heading1,
|
|
123
|
-
title: menubar_1.i18n.bind(null, 'heading1'),
|
|
124
|
-
icon: icons_1.icons.h1,
|
|
125
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading1),
|
|
126
|
-
exec: (e) => e.actions.toH1.run(),
|
|
127
|
-
isActive: (e) => e.actions.toH1.isActive(),
|
|
128
|
-
isEnable: (e) => e.actions.toH1.isEnable(),
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
id: action_names_1.ActionName.heading2,
|
|
132
|
-
title: menubar_1.i18n.bind(null, 'heading2'),
|
|
133
|
-
icon: icons_1.icons.h2,
|
|
134
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading2),
|
|
135
|
-
exec: (e) => e.actions.toH2.run(),
|
|
136
|
-
isActive: (e) => e.actions.toH2.isActive(),
|
|
137
|
-
isEnable: (e) => e.actions.toH2.isEnable(),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: action_names_1.ActionName.heading3,
|
|
141
|
-
title: menubar_1.i18n.bind(null, 'heading3'),
|
|
142
|
-
icon: icons_1.icons.h3,
|
|
143
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading3),
|
|
144
|
-
exec: (e) => e.actions.toH3.run(),
|
|
145
|
-
isActive: (e) => e.actions.toH3.isActive(),
|
|
146
|
-
isEnable: (e) => e.actions.toH3.isEnable(),
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
id: action_names_1.ActionName.heading4,
|
|
150
|
-
title: menubar_1.i18n.bind(null, 'heading4'),
|
|
151
|
-
icon: icons_1.icons.h4,
|
|
152
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading4),
|
|
153
|
-
exec: (e) => e.actions.toH4.run(),
|
|
154
|
-
isActive: (e) => e.actions.toH4.isActive(),
|
|
155
|
-
isEnable: (e) => e.actions.toH4.isEnable(),
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: action_names_1.ActionName.heading5,
|
|
159
|
-
title: menubar_1.i18n.bind(null, 'heading5'),
|
|
160
|
-
icon: icons_1.icons.h5,
|
|
161
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading5),
|
|
162
|
-
exec: (e) => e.actions.toH5.run(),
|
|
163
|
-
isActive: (e) => e.actions.toH5.isActive(),
|
|
164
|
-
isEnable: (e) => e.actions.toH5.isEnable(),
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: action_names_1.ActionName.heading6,
|
|
168
|
-
title: menubar_1.i18n.bind(null, 'heading6'),
|
|
169
|
-
icon: icons_1.icons.h6,
|
|
170
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading6),
|
|
171
|
-
exec: (e) => e.actions.toH6.run(),
|
|
172
|
-
isActive: (e) => e.actions.toH6.isActive(),
|
|
173
|
-
isEnable: (e) => e.actions.toH6.isEnable(),
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
};
|
|
177
|
-
exports.wListsListConfig = {
|
|
178
|
-
icon: icons_1.icons.bulletList,
|
|
179
|
-
withArrow: true,
|
|
180
|
-
title: menubar_1.i18n.bind(null, 'list'),
|
|
181
|
-
data: [
|
|
182
|
-
{
|
|
183
|
-
id: action_names_1.ActionName.bulletList,
|
|
184
|
-
title: menubar_1.i18n.bind(null, 'ulist'),
|
|
185
|
-
icon: icons_1.icons.bulletList,
|
|
186
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.BulletList),
|
|
187
|
-
exec: (e) => e.actions.toBulletList.run(),
|
|
188
|
-
isActive: (e) => e.actions.toBulletList.isActive(),
|
|
189
|
-
isEnable: (e) => e.actions.toBulletList.isEnable(),
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: action_names_1.ActionName.orderedList,
|
|
193
|
-
title: menubar_1.i18n.bind(null, 'olist'),
|
|
194
|
-
icon: icons_1.icons.orderedList,
|
|
195
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.OrderedList),
|
|
196
|
-
exec: (e) => e.actions.toOrderedList.run(),
|
|
197
|
-
isActive: (e) => e.actions.toOrderedList.isActive(),
|
|
198
|
-
isEnable: (e) => e.actions.toOrderedList.isEnable(),
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: action_names_1.ActionName.sinkListItem,
|
|
202
|
-
title: menubar_1.i18n.bind(null, 'list__action_sink'),
|
|
203
|
-
hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
|
|
204
|
-
icon: icons_1.icons.sink,
|
|
205
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.SinkListItem),
|
|
206
|
-
exec: (e) => e.actions.sinkListItem.run(),
|
|
207
|
-
isActive: (e) => e.actions.sinkListItem.isActive(),
|
|
208
|
-
isEnable: (e) => e.actions.sinkListItem.isEnable(),
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: action_names_1.ActionName.liftListItem,
|
|
212
|
-
title: menubar_1.i18n.bind(null, 'list__action_lift'),
|
|
213
|
-
hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
|
|
214
|
-
icon: icons_1.icons.lift,
|
|
215
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.LiftListItem),
|
|
216
|
-
exec: (e) => e.actions.liftListItem.run(),
|
|
217
|
-
isActive: (e) => e.actions.liftListItem.isActive(),
|
|
218
|
-
isEnable: (e) => e.actions.liftListItem.isEnable(),
|
|
219
|
-
},
|
|
220
|
-
],
|
|
221
|
-
};
|
|
96
|
+
// ----
|
|
222
97
|
exports.wCheckboxItemData = {
|
|
223
98
|
id: action_names_1.ActionName.checkbox,
|
|
224
|
-
type:
|
|
99
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
225
100
|
title: menubar_1.i18n.bind(null, 'checkbox'),
|
|
226
101
|
icon: icons_1.icons.checklist,
|
|
227
102
|
exec: (e) => e.actions.addCheckbox.run(),
|
|
@@ -230,7 +105,7 @@ exports.wCheckboxItemData = {
|
|
|
230
105
|
};
|
|
231
106
|
exports.wLinkItemData = {
|
|
232
107
|
id: action_names_1.ActionName.link,
|
|
233
|
-
type:
|
|
108
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
234
109
|
title: menubar_1.i18n.bind(null, 'link'),
|
|
235
110
|
icon: icons_1.icons.link,
|
|
236
111
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Link),
|
|
@@ -240,7 +115,7 @@ exports.wLinkItemData = {
|
|
|
240
115
|
};
|
|
241
116
|
exports.wQuoteItemData = {
|
|
242
117
|
id: action_names_1.ActionName.quote,
|
|
243
|
-
type:
|
|
118
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
244
119
|
title: menubar_1.i18n.bind(null, 'quote'),
|
|
245
120
|
icon: icons_1.icons.quote,
|
|
246
121
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Quote),
|
|
@@ -250,7 +125,7 @@ exports.wQuoteItemData = {
|
|
|
250
125
|
};
|
|
251
126
|
exports.wCutItemData = {
|
|
252
127
|
id: action_names_1.ActionName.yfm_cut,
|
|
253
|
-
type:
|
|
128
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
254
129
|
title: menubar_1.i18n.bind(null, 'cut'),
|
|
255
130
|
icon: icons_1.icons.cut,
|
|
256
131
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Cut),
|
|
@@ -258,32 +133,9 @@ exports.wCutItemData = {
|
|
|
258
133
|
isActive: (e) => e.actions.toYfmCut.isActive(),
|
|
259
134
|
isEnable: (e) => e.actions.toYfmCut.isEnable(),
|
|
260
135
|
};
|
|
261
|
-
exports.wListMoveListConfig = {
|
|
262
|
-
icon: icons_1.icons.lift,
|
|
263
|
-
withArrow: true,
|
|
264
|
-
title: 'Move list item',
|
|
265
|
-
data: [
|
|
266
|
-
{
|
|
267
|
-
id: action_names_1.ActionName.sinkListItem,
|
|
268
|
-
title: 'Sink list item',
|
|
269
|
-
icon: icons_1.icons.sink,
|
|
270
|
-
exec: (e) => e.actions.sinkListItem.run(),
|
|
271
|
-
isActive: (e) => e.actions.sinkListItem.isActive(),
|
|
272
|
-
isEnable: (e) => e.actions.sinkListItem.isEnable(),
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
id: action_names_1.ActionName.liftListItem,
|
|
276
|
-
title: 'Lift list item',
|
|
277
|
-
icon: icons_1.icons.lift,
|
|
278
|
-
exec: (e) => e.actions.liftListItem.run(),
|
|
279
|
-
isActive: (e) => e.actions.liftListItem.isActive(),
|
|
280
|
-
isEnable: (e) => e.actions.liftListItem.isEnable(),
|
|
281
|
-
},
|
|
282
|
-
],
|
|
283
|
-
};
|
|
284
136
|
exports.wNoteItemData = {
|
|
285
137
|
id: action_names_1.ActionName.yfm_note,
|
|
286
|
-
type:
|
|
138
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
287
139
|
title: menubar_1.i18n.bind(null, 'note'),
|
|
288
140
|
icon: icons_1.icons.note,
|
|
289
141
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Note),
|
|
@@ -293,7 +145,7 @@ exports.wNoteItemData = {
|
|
|
293
145
|
};
|
|
294
146
|
exports.wTableItemData = {
|
|
295
147
|
id: action_names_1.ActionName.table,
|
|
296
|
-
type:
|
|
148
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
297
149
|
title: menubar_1.i18n.bind(null, 'table'),
|
|
298
150
|
icon: icons_1.icons.table,
|
|
299
151
|
exec: (e) => e.actions.createYfmTable.run(),
|
|
@@ -302,7 +154,7 @@ exports.wTableItemData = {
|
|
|
302
154
|
};
|
|
303
155
|
exports.wCodeItemData = {
|
|
304
156
|
id: action_names_1.ActionName.code_inline,
|
|
305
|
-
type:
|
|
157
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
306
158
|
title: menubar_1.i18n.bind(null, 'code_inline'),
|
|
307
159
|
icon: icons_1.icons.code,
|
|
308
160
|
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Code),
|
|
@@ -310,58 +162,36 @@ exports.wCodeItemData = {
|
|
|
310
162
|
isActive: (e) => e.actions.code.isActive(),
|
|
311
163
|
isEnable: (e) => e.actions.code.isEnable(),
|
|
312
164
|
};
|
|
313
|
-
exports.wCodeBlockItemData = {
|
|
314
|
-
id: action_names_1.ActionName.code_block,
|
|
315
|
-
title: menubar_1.i18n.bind(null, 'codeblock'),
|
|
316
|
-
icon: icons_1.icons.codeBlock,
|
|
317
|
-
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.CodeBlock),
|
|
318
|
-
exec: (e) => e.actions.toCodeBlock.run(),
|
|
319
|
-
isActive: (e) => e.actions.toCodeBlock.isActive(),
|
|
320
|
-
isEnable: (e) => e.actions.toCodeBlock.isEnable(),
|
|
321
|
-
};
|
|
322
|
-
exports.wCodeListConfig = {
|
|
323
|
-
icon: icons_1.icons.code,
|
|
324
|
-
withArrow: true,
|
|
325
|
-
title: menubar_1.i18n.bind(null, 'code'),
|
|
326
|
-
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
327
|
-
};
|
|
328
165
|
exports.wImageItemData = {
|
|
329
166
|
id: action_names_1.ActionName.image,
|
|
330
|
-
type:
|
|
167
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
331
168
|
title: menubar_1.i18n.bind(null, 'image'),
|
|
332
169
|
icon: icons_1.icons.image,
|
|
333
170
|
exec: (e) => e.actions.addImageWidget.run(),
|
|
334
171
|
isActive: (e) => e.actions.addImageWidget.isActive(),
|
|
335
172
|
isEnable: (e) => e.actions.addImageWidget.isEnable(),
|
|
336
173
|
};
|
|
337
|
-
exports.wHruleItemData = {
|
|
338
|
-
id: action_names_1.ActionName.horizontalrule,
|
|
339
|
-
title: menubar_1.i18n.bind(null, 'hrule'),
|
|
340
|
-
icon: icons_1.icons.horizontalRule,
|
|
341
|
-
exec: (e) => e.actions.hRule.run(),
|
|
342
|
-
isActive: (e) => e.actions.hRule.isActive(),
|
|
343
|
-
isEnable: (e) => e.actions.hRule.isEnable(),
|
|
344
|
-
};
|
|
345
|
-
exports.wEmojiItemData = {
|
|
346
|
-
id: action_names_1.ActionName.emoji,
|
|
347
|
-
title: menubar_1.i18n.bind(null, 'emoji'),
|
|
348
|
-
icon: icons_1.icons.emoji,
|
|
349
|
-
exec: (e) => e.actions.openEmojiSuggest.run({}),
|
|
350
|
-
isActive: (e) => e.actions.openEmojiSuggest.isActive(),
|
|
351
|
-
isEnable: (e) => e.actions.openEmojiSuggest.isEnable(),
|
|
352
|
-
};
|
|
353
174
|
exports.wFileItemData = {
|
|
354
175
|
id: action_names_1.ActionName.file,
|
|
355
|
-
type:
|
|
176
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
356
177
|
title: menubar_1.i18n.bind(null, 'file'),
|
|
357
178
|
icon: icons_1.icons.file,
|
|
358
179
|
exec: (e) => e.actions.addFile.run(),
|
|
359
180
|
isActive: (e) => e.actions.addFile.isActive(),
|
|
360
181
|
isEnable: (e) => e.actions.addFile.isEnable(),
|
|
361
182
|
};
|
|
183
|
+
exports.wTabsItemData = {
|
|
184
|
+
id: action_names_1.ActionName.tabs,
|
|
185
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
186
|
+
title: menubar_1.i18n.bind(null, 'tabs'),
|
|
187
|
+
icon: icons_1.icons.tabs,
|
|
188
|
+
exec: (e) => e.actions.toYfmTabs.run(),
|
|
189
|
+
isActive: (e) => e.actions.toYfmTabs.isActive(),
|
|
190
|
+
isEnable: (e) => e.actions.toYfmTabs.isEnable(),
|
|
191
|
+
};
|
|
362
192
|
exports.wMathInlineItemData = {
|
|
363
193
|
id: action_names_1.ActionName.math_inline,
|
|
364
|
-
type:
|
|
194
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
365
195
|
title: menubar_1.i18n.bind(null, 'math_inline'),
|
|
366
196
|
icon: icons_1.icons.functionInline,
|
|
367
197
|
hint: () => `${hints_1.i18n.bind(null, 'math_hint')()} ${hints_1.i18n.bind(null, 'math_hint_katex')()}`,
|
|
@@ -369,18 +199,9 @@ exports.wMathInlineItemData = {
|
|
|
369
199
|
isActive: (e) => e.actions.addMathInline.isActive(),
|
|
370
200
|
isEnable: (e) => e.actions.addMathInline.isEnable(),
|
|
371
201
|
};
|
|
372
|
-
exports.wTabsItemData = {
|
|
373
|
-
id: action_names_1.ActionName.tabs,
|
|
374
|
-
type: types_1.ToolbarDataType.SingleButton,
|
|
375
|
-
title: menubar_1.i18n.bind(null, 'tabs'),
|
|
376
|
-
icon: icons_1.icons.tabs,
|
|
377
|
-
exec: (e) => e.actions.toYfmTabs.run(),
|
|
378
|
-
isActive: (e) => e.actions.toYfmTabs.isActive(),
|
|
379
|
-
isEnable: (e) => e.actions.toYfmTabs.isEnable(),
|
|
380
|
-
};
|
|
381
202
|
exports.wMathBlockItemData = {
|
|
382
203
|
id: action_names_1.ActionName.math_block,
|
|
383
|
-
type:
|
|
204
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
384
205
|
title: menubar_1.i18n.bind(null, 'math_block'),
|
|
385
206
|
icon: icons_1.icons.functionBlock,
|
|
386
207
|
hint: () => `${hints_1.i18n.bind(null, 'math_hint')()} ${hints_1.i18n.bind(null, 'math_hint_katex')()}`,
|
|
@@ -388,16 +209,9 @@ exports.wMathBlockItemData = {
|
|
|
388
209
|
isActive: (e) => e.actions.toMathBlock.isActive(),
|
|
389
210
|
isEnable: (e) => e.actions.toMathBlock.isEnable(),
|
|
390
211
|
};
|
|
391
|
-
exports.wMathListConfig = {
|
|
392
|
-
icon: icons_1.icons.functionInline,
|
|
393
|
-
withArrow: true,
|
|
394
|
-
title: menubar_1.i18n.bind(null, 'math'),
|
|
395
|
-
data: [exports.wMathInlineItemData, exports.wMathBlockItemData],
|
|
396
|
-
};
|
|
397
|
-
exports.wMathListItem = Object.assign({ id: 'math', type: types_1.ToolbarDataType.ListButton }, exports.wMathListConfig);
|
|
398
212
|
exports.wYfmHtmlBlockItemData = {
|
|
399
213
|
id: action_names_1.ActionName.yfm_html_block,
|
|
400
|
-
type:
|
|
214
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
401
215
|
title: menubar_1.i18n.bind(null, 'html'),
|
|
402
216
|
icon: icons_1.icons.html,
|
|
403
217
|
exec: (e) => e.actions.createYfmHtmlBlock.run(),
|
|
@@ -406,7 +220,7 @@ exports.wYfmHtmlBlockItemData = {
|
|
|
406
220
|
};
|
|
407
221
|
exports.wGptItemData = {
|
|
408
222
|
id: action_names_1.ActionName.gpt,
|
|
409
|
-
type:
|
|
223
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
410
224
|
title: menubar_1.i18n.bind(null, 'gpt'),
|
|
411
225
|
hotkey: constants_1.gptHotKeys.openGptKeyTooltip,
|
|
412
226
|
icon: icons_1.icons.gpt,
|
|
@@ -414,9 +228,240 @@ exports.wGptItemData = {
|
|
|
414
228
|
isActive: (e) => e.actions.addGptWidget.isActive(),
|
|
415
229
|
isEnable: (e) => e.actions.addGptWidget.isEnable(),
|
|
416
230
|
};
|
|
231
|
+
exports.wMermaidItemData = {
|
|
232
|
+
id: action_names_1.ActionName.mermaid,
|
|
233
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
234
|
+
title: menubar_1.i18n.bind(null, 'mermaid'),
|
|
235
|
+
icon: icons_1.icons.mermaid,
|
|
236
|
+
exec: (e) => e.actions.createMermaid.run(),
|
|
237
|
+
isActive: (e) => e.actions.createMermaid.isActive(),
|
|
238
|
+
isEnable: (e) => e.actions.createMermaid.isEnable(),
|
|
239
|
+
};
|
|
240
|
+
exports.wCodeBlockItemData = {
|
|
241
|
+
id: action_names_1.ActionName.code_block,
|
|
242
|
+
title: menubar_1.i18n.bind(null, 'codeblock'),
|
|
243
|
+
icon: icons_1.icons.codeBlock,
|
|
244
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.CodeBlock),
|
|
245
|
+
exec: (e) => e.actions.toCodeBlock.run(),
|
|
246
|
+
isActive: (e) => e.actions.toCodeBlock.isActive(),
|
|
247
|
+
isEnable: (e) => e.actions.toCodeBlock.isEnable(),
|
|
248
|
+
};
|
|
249
|
+
exports.wHruleItemData = {
|
|
250
|
+
id: action_names_1.ActionName.horizontalrule,
|
|
251
|
+
title: menubar_1.i18n.bind(null, 'hrule'),
|
|
252
|
+
icon: icons_1.icons.horizontalRule,
|
|
253
|
+
exec: (e) => e.actions.hRule.run(),
|
|
254
|
+
isActive: (e) => e.actions.hRule.isActive(),
|
|
255
|
+
isEnable: (e) => e.actions.hRule.isEnable(),
|
|
256
|
+
};
|
|
257
|
+
exports.wEmojiItemData = {
|
|
258
|
+
id: action_names_1.ActionName.emoji,
|
|
259
|
+
title: menubar_1.i18n.bind(null, 'emoji'),
|
|
260
|
+
icon: icons_1.icons.emoji,
|
|
261
|
+
exec: (e) => e.actions.openEmojiSuggest.run({}),
|
|
262
|
+
isActive: (e) => e.actions.openEmojiSuggest.isActive(),
|
|
263
|
+
isEnable: (e) => e.actions.openEmojiSuggest.isEnable(),
|
|
264
|
+
};
|
|
265
|
+
exports.wToggleHeadingFoldingItemData = {
|
|
266
|
+
id: 'folding-heading',
|
|
267
|
+
type: toolbar_1.ToolbarDataType.SingleButton,
|
|
268
|
+
icon: icons_1.icons.foldingHeading,
|
|
269
|
+
title: () => (0, menubar_1.i18n)('folding-heading'),
|
|
270
|
+
hint: () => (0, menubar_1.i18n)('folding-heading__hint'),
|
|
271
|
+
isActive: (editor) => { var _a, _b; return (_b = (_a = editor.actions.toggleHeadingFolding) === null || _a === void 0 ? void 0 : _a.isActive()) !== null && _b !== void 0 ? _b : false; },
|
|
272
|
+
isEnable: (editor) => { var _a, _b; return (_b = (_a = editor.actions.toggleHeadingFolding) === null || _a === void 0 ? void 0 : _a.isEnable()) !== null && _b !== void 0 ? _b : false; },
|
|
273
|
+
exec: (editor) => editor.actions.toggleHeadingFolding.run(),
|
|
274
|
+
condition: 'enabled',
|
|
275
|
+
};
|
|
276
|
+
exports.textContextItemData = {
|
|
277
|
+
id: 'text',
|
|
278
|
+
type: toolbar_1.ToolbarDataType.ReactComponent,
|
|
279
|
+
component: WToolbarTextSelect_1.WToolbarTextSelect,
|
|
280
|
+
width: 0,
|
|
281
|
+
condition: ({ selection: { $from, $to }, schema }) => {
|
|
282
|
+
if (!$from.sameParent($to))
|
|
283
|
+
return false;
|
|
284
|
+
const { parent } = $from;
|
|
285
|
+
return parent.type === (0, extensions_1.pType)(schema) || parent.type === (0, extensions_1.headingType)(schema);
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
exports.wMathListItem = {
|
|
289
|
+
id: 'math',
|
|
290
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
291
|
+
icon: icons_1.icons.functionInline,
|
|
292
|
+
withArrow: true,
|
|
293
|
+
title: menubar_1.i18n.bind(null, 'math'),
|
|
294
|
+
data: [exports.wMathInlineItemData, exports.wMathBlockItemData],
|
|
295
|
+
};
|
|
296
|
+
exports.wTextItemData = {
|
|
297
|
+
id: action_names_1.ActionName.paragraph,
|
|
298
|
+
title: menubar_1.i18n.bind(null, 'text'),
|
|
299
|
+
icon: icons_1.icons.text,
|
|
300
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Text),
|
|
301
|
+
exec: (e) => e.actions.toParagraph.run(),
|
|
302
|
+
isActive: (e) => e.actions.toParagraph.isActive(),
|
|
303
|
+
isEnable: (e) => e.actions.toParagraph.isEnable(),
|
|
304
|
+
doNotActivateList: true,
|
|
305
|
+
};
|
|
306
|
+
exports.wHeading1ItemData = {
|
|
307
|
+
id: action_names_1.ActionName.heading1,
|
|
308
|
+
title: menubar_1.i18n.bind(null, 'heading1'),
|
|
309
|
+
icon: icons_1.icons.h1,
|
|
310
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading1),
|
|
311
|
+
exec: (e) => e.actions.toH1.run(),
|
|
312
|
+
isActive: (e) => e.actions.toH1.isActive(),
|
|
313
|
+
isEnable: (e) => e.actions.toH1.isEnable(),
|
|
314
|
+
};
|
|
315
|
+
exports.wHeading2ItemData = {
|
|
316
|
+
id: action_names_1.ActionName.heading2,
|
|
317
|
+
title: menubar_1.i18n.bind(null, 'heading2'),
|
|
318
|
+
icon: icons_1.icons.h2,
|
|
319
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading2),
|
|
320
|
+
exec: (e) => e.actions.toH2.run(),
|
|
321
|
+
isActive: (e) => e.actions.toH2.isActive(),
|
|
322
|
+
isEnable: (e) => e.actions.toH2.isEnable(),
|
|
323
|
+
};
|
|
324
|
+
exports.wHeading3ItemData = {
|
|
325
|
+
id: action_names_1.ActionName.heading3,
|
|
326
|
+
title: menubar_1.i18n.bind(null, 'heading3'),
|
|
327
|
+
icon: icons_1.icons.h3,
|
|
328
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading3),
|
|
329
|
+
exec: (e) => e.actions.toH3.run(),
|
|
330
|
+
isActive: (e) => e.actions.toH3.isActive(),
|
|
331
|
+
isEnable: (e) => e.actions.toH3.isEnable(),
|
|
332
|
+
};
|
|
333
|
+
exports.wHeading4ItemData = {
|
|
334
|
+
id: action_names_1.ActionName.heading4,
|
|
335
|
+
title: menubar_1.i18n.bind(null, 'heading4'),
|
|
336
|
+
icon: icons_1.icons.h4,
|
|
337
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading4),
|
|
338
|
+
exec: (e) => e.actions.toH4.run(),
|
|
339
|
+
isActive: (e) => e.actions.toH4.isActive(),
|
|
340
|
+
isEnable: (e) => e.actions.toH4.isEnable(),
|
|
341
|
+
};
|
|
342
|
+
exports.wHeading5ItemData = {
|
|
343
|
+
id: action_names_1.ActionName.heading5,
|
|
344
|
+
title: menubar_1.i18n.bind(null, 'heading5'),
|
|
345
|
+
icon: icons_1.icons.h5,
|
|
346
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading5),
|
|
347
|
+
exec: (e) => e.actions.toH5.run(),
|
|
348
|
+
isActive: (e) => e.actions.toH5.isActive(),
|
|
349
|
+
isEnable: (e) => e.actions.toH5.isEnable(),
|
|
350
|
+
};
|
|
351
|
+
exports.wHeading6ItemData = {
|
|
352
|
+
id: action_names_1.ActionName.heading6,
|
|
353
|
+
title: menubar_1.i18n.bind(null, 'heading6'),
|
|
354
|
+
icon: icons_1.icons.h6,
|
|
355
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading6),
|
|
356
|
+
exec: (e) => e.actions.toH6.run(),
|
|
357
|
+
isActive: (e) => e.actions.toH6.isActive(),
|
|
358
|
+
isEnable: (e) => e.actions.toH6.isEnable(),
|
|
359
|
+
};
|
|
360
|
+
exports.wBulletListItemData = {
|
|
361
|
+
id: action_names_1.ActionName.bulletList,
|
|
362
|
+
title: menubar_1.i18n.bind(null, 'ulist'),
|
|
363
|
+
icon: icons_1.icons.bulletList,
|
|
364
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.BulletList),
|
|
365
|
+
exec: (e) => e.actions.toBulletList.run(),
|
|
366
|
+
isActive: (e) => e.actions.toBulletList.isActive(),
|
|
367
|
+
isEnable: (e) => e.actions.toBulletList.isEnable(),
|
|
368
|
+
};
|
|
369
|
+
exports.wOrderedListItemData = {
|
|
370
|
+
id: action_names_1.ActionName.orderedList,
|
|
371
|
+
title: menubar_1.i18n.bind(null, 'olist'),
|
|
372
|
+
icon: icons_1.icons.orderedList,
|
|
373
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.OrderedList),
|
|
374
|
+
exec: (e) => e.actions.toOrderedList.run(),
|
|
375
|
+
isActive: (e) => e.actions.toOrderedList.isActive(),
|
|
376
|
+
isEnable: (e) => e.actions.toOrderedList.isEnable(),
|
|
377
|
+
};
|
|
378
|
+
exports.wSinkListItemData = {
|
|
379
|
+
id: action_names_1.ActionName.sinkListItem,
|
|
380
|
+
title: menubar_1.i18n.bind(null, 'list__action_sink'),
|
|
381
|
+
hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
|
|
382
|
+
icon: icons_1.icons.sink,
|
|
383
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.SinkListItem),
|
|
384
|
+
exec: (e) => e.actions.sinkListItem.run(),
|
|
385
|
+
isActive: (e) => e.actions.sinkListItem.isActive(),
|
|
386
|
+
isEnable: (e) => e.actions.sinkListItem.isEnable(),
|
|
387
|
+
};
|
|
388
|
+
exports.wLiftListItemData = {
|
|
389
|
+
id: action_names_1.ActionName.liftListItem,
|
|
390
|
+
title: menubar_1.i18n.bind(null, 'list__action_lift'),
|
|
391
|
+
hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
|
|
392
|
+
icon: icons_1.icons.lift,
|
|
393
|
+
hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.LiftListItem),
|
|
394
|
+
exec: (e) => e.actions.liftListItem.run(),
|
|
395
|
+
isActive: (e) => e.actions.liftListItem.isActive(),
|
|
396
|
+
isEnable: (e) => e.actions.liftListItem.isEnable(),
|
|
397
|
+
};
|
|
398
|
+
exports.wHeadingListConfig = {
|
|
399
|
+
icon: icons_1.icons.headline,
|
|
400
|
+
withArrow: true,
|
|
401
|
+
title: menubar_1.i18n.bind(null, 'heading'),
|
|
402
|
+
data: [
|
|
403
|
+
exports.wTextItemData,
|
|
404
|
+
exports.wHeading1ItemData,
|
|
405
|
+
exports.wHeading2ItemData,
|
|
406
|
+
exports.wHeading3ItemData,
|
|
407
|
+
exports.wHeading4ItemData,
|
|
408
|
+
exports.wHeading5ItemData,
|
|
409
|
+
exports.wHeading6ItemData,
|
|
410
|
+
],
|
|
411
|
+
};
|
|
412
|
+
exports.wListsListConfig = {
|
|
413
|
+
icon: icons_1.icons.bulletList,
|
|
414
|
+
withArrow: true,
|
|
415
|
+
title: menubar_1.i18n.bind(null, 'list'),
|
|
416
|
+
data: [exports.wBulletListItemData, exports.wOrderedListItemData, exports.wSinkListItemData, exports.wLiftListItemData],
|
|
417
|
+
};
|
|
418
|
+
exports.wListMoveListConfig = {
|
|
419
|
+
icon: icons_1.icons.lift,
|
|
420
|
+
withArrow: true,
|
|
421
|
+
title: 'Move list item',
|
|
422
|
+
data: [
|
|
423
|
+
{
|
|
424
|
+
id: action_names_1.ActionName.sinkListItem,
|
|
425
|
+
title: 'Sink list item',
|
|
426
|
+
icon: icons_1.icons.sink,
|
|
427
|
+
exec: (e) => e.actions.sinkListItem.run(),
|
|
428
|
+
isActive: (e) => e.actions.sinkListItem.isActive(),
|
|
429
|
+
isEnable: (e) => e.actions.sinkListItem.isEnable(),
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: action_names_1.ActionName.liftListItem,
|
|
433
|
+
title: 'Lift list item',
|
|
434
|
+
icon: icons_1.icons.lift,
|
|
435
|
+
exec: (e) => e.actions.liftListItem.run(),
|
|
436
|
+
isActive: (e) => e.actions.liftListItem.isActive(),
|
|
437
|
+
isEnable: (e) => e.actions.liftListItem.isEnable(),
|
|
438
|
+
},
|
|
439
|
+
],
|
|
440
|
+
};
|
|
441
|
+
exports.wCodeListConfig = {
|
|
442
|
+
icon: icons_1.icons.code,
|
|
443
|
+
withArrow: true,
|
|
444
|
+
title: menubar_1.i18n.bind(null, 'code'),
|
|
445
|
+
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
446
|
+
};
|
|
447
|
+
exports.wMathListConfig = {
|
|
448
|
+
icon: icons_1.icons.functionInline,
|
|
449
|
+
withArrow: true,
|
|
450
|
+
title: menubar_1.i18n.bind(null, 'math'),
|
|
451
|
+
data: [exports.wMathInlineItemData, exports.wMathBlockItemData],
|
|
452
|
+
};
|
|
417
453
|
exports.wCommandMenuConfig = [
|
|
418
|
-
|
|
419
|
-
|
|
454
|
+
exports.wTextItemData,
|
|
455
|
+
exports.wHeading1ItemData,
|
|
456
|
+
exports.wHeading2ItemData,
|
|
457
|
+
exports.wHeading3ItemData,
|
|
458
|
+
exports.wHeading4ItemData,
|
|
459
|
+
exports.wHeading5ItemData,
|
|
460
|
+
exports.wHeading6ItemData,
|
|
461
|
+
exports.wBulletListItemData,
|
|
462
|
+
exports.wOrderedListItemData,
|
|
463
|
+
exports.wSinkListItemData,
|
|
464
|
+
exports.wLiftListItemData,
|
|
420
465
|
exports.wLinkItemData,
|
|
421
466
|
exports.wQuoteItemData,
|
|
422
467
|
exports.wNoteItemData,
|
|
@@ -428,21 +473,56 @@ exports.wCommandMenuConfig = [
|
|
|
428
473
|
exports.wHruleItemData,
|
|
429
474
|
exports.wEmojiItemData,
|
|
430
475
|
exports.wFileItemData,
|
|
431
|
-
// wMathInlineItemData,
|
|
432
|
-
// wMathBlockItemData,
|
|
433
476
|
exports.wTabsItemData,
|
|
434
477
|
];
|
|
435
478
|
exports.wHiddenData = exports.wCommandMenuConfig;
|
|
436
|
-
|
|
479
|
+
exports.wHistoryGroupConfig = [exports.wUndoItemData, exports.wRedoItemData];
|
|
480
|
+
exports.wBiusGroupConfig = [
|
|
481
|
+
exports.wBoldItemData,
|
|
482
|
+
exports.wItalicItemData,
|
|
483
|
+
exports.wUnderlineItemData,
|
|
484
|
+
exports.wStrikethroughItemData,
|
|
485
|
+
exports.wMonospaceItemData,
|
|
486
|
+
exports.wMarkedItemData,
|
|
487
|
+
];
|
|
437
488
|
exports.wToolbarConfig = [
|
|
438
|
-
exports.
|
|
439
|
-
exports.wBiusGroupConfig,
|
|
489
|
+
[exports.wUndoItemData, exports.wRedoItemData],
|
|
440
490
|
[
|
|
441
|
-
|
|
442
|
-
|
|
491
|
+
exports.wBoldItemData,
|
|
492
|
+
exports.wItalicItemData,
|
|
493
|
+
exports.wUnderlineItemData,
|
|
494
|
+
exports.wStrikethroughItemData,
|
|
495
|
+
exports.wMonospaceItemData,
|
|
496
|
+
exports.wMarkedItemData,
|
|
497
|
+
],
|
|
498
|
+
[
|
|
499
|
+
{
|
|
500
|
+
id: 'heading',
|
|
501
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
502
|
+
icon: icons_1.icons.headline,
|
|
503
|
+
withArrow: true,
|
|
504
|
+
title: menubar_1.i18n.bind(null, 'heading'),
|
|
505
|
+
data: [
|
|
506
|
+
exports.wTextItemData,
|
|
507
|
+
exports.wHeading1ItemData,
|
|
508
|
+
exports.wHeading2ItemData,
|
|
509
|
+
exports.wHeading3ItemData,
|
|
510
|
+
exports.wHeading4ItemData,
|
|
511
|
+
exports.wHeading5ItemData,
|
|
512
|
+
exports.wHeading6ItemData,
|
|
513
|
+
],
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
id: 'list',
|
|
517
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
518
|
+
icon: icons_1.icons.bulletList,
|
|
519
|
+
withArrow: true,
|
|
520
|
+
title: menubar_1.i18n.bind(null, 'list'),
|
|
521
|
+
data: [exports.wBulletListItemData, exports.wOrderedListItemData, exports.wSinkListItemData, exports.wLiftListItemData],
|
|
522
|
+
},
|
|
443
523
|
{
|
|
444
524
|
id: 'colorify',
|
|
445
|
-
type:
|
|
525
|
+
type: toolbar_1.ToolbarDataType.ReactComponent,
|
|
446
526
|
component: WToolbarColors_1.WToolbarColors,
|
|
447
527
|
width: 42,
|
|
448
528
|
},
|
|
@@ -450,81 +530,132 @@ exports.wToolbarConfig = [
|
|
|
450
530
|
exports.wNoteItemData,
|
|
451
531
|
exports.wCutItemData,
|
|
452
532
|
exports.wQuoteItemData,
|
|
453
|
-
|
|
533
|
+
{
|
|
534
|
+
id: 'code',
|
|
535
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
536
|
+
icon: icons_1.icons.code,
|
|
537
|
+
withArrow: true,
|
|
538
|
+
title: menubar_1.i18n.bind(null, 'code'),
|
|
539
|
+
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
540
|
+
},
|
|
454
541
|
],
|
|
455
542
|
[exports.wImageItemData, exports.wFileItemData, exports.wTableItemData, exports.wCheckboxItemData],
|
|
456
543
|
];
|
|
457
|
-
exports.wToggleHeadingFoldingItemData = {
|
|
458
|
-
id: 'folding-heading',
|
|
459
|
-
type: types_1.ToolbarDataType.SingleButton,
|
|
460
|
-
icon: icons_1.icons.foldingHeading,
|
|
461
|
-
title: () => (0, menubar_1.i18n)('folding-heading'),
|
|
462
|
-
hint: () => (0, menubar_1.i18n)('folding-heading__hint'),
|
|
463
|
-
isActive: (editor) => { var _a, _b; return (_b = (_a = editor.actions.toggleHeadingFolding) === null || _a === void 0 ? void 0 : _a.isActive()) !== null && _b !== void 0 ? _b : false; },
|
|
464
|
-
isEnable: (editor) => { var _a, _b; return (_b = (_a = editor.actions.toggleHeadingFolding) === null || _a === void 0 ? void 0 : _a.isEnable()) !== null && _b !== void 0 ? _b : false; },
|
|
465
|
-
exec: (editor) => editor.actions.toggleHeadingFolding.run(),
|
|
466
|
-
condition: 'enabled',
|
|
467
|
-
};
|
|
468
|
-
const textContextItemData = {
|
|
469
|
-
id: 'text',
|
|
470
|
-
type: types_1.ToolbarDataType.ReactComponent,
|
|
471
|
-
component: WToolbarTextSelect_1.WToolbarTextSelect,
|
|
472
|
-
width: 0,
|
|
473
|
-
condition: ({ selection: { $from, $to }, schema }) => {
|
|
474
|
-
if (!$from.sameParent($to))
|
|
475
|
-
return false;
|
|
476
|
-
const { parent } = $from;
|
|
477
|
-
return parent.type === (0, extensions_1.pType)(schema) || parent.type === (0, extensions_1.headingType)(schema);
|
|
478
|
-
},
|
|
479
|
-
};
|
|
480
544
|
exports.wSelectionMenuConfig = [
|
|
481
|
-
[exports.wToggleHeadingFoldingItemData, textContextItemData],
|
|
482
|
-
[
|
|
545
|
+
[exports.wToggleHeadingFoldingItemData, exports.textContextItemData],
|
|
546
|
+
[
|
|
547
|
+
exports.wBoldItemData,
|
|
548
|
+
exports.wItalicItemData,
|
|
549
|
+
exports.wUnderlineItemData,
|
|
550
|
+
exports.wStrikethroughItemData,
|
|
551
|
+
exports.wMonospaceItemData,
|
|
552
|
+
exports.wMarkedItemData,
|
|
553
|
+
exports.wCodeItemData,
|
|
554
|
+
],
|
|
483
555
|
[
|
|
484
556
|
{
|
|
485
557
|
id: 'colorify',
|
|
486
|
-
type:
|
|
558
|
+
type: toolbar_1.ToolbarDataType.ReactComponent,
|
|
487
559
|
component: WToolbarColors_1.WToolbarColors,
|
|
488
560
|
width: 42,
|
|
489
561
|
},
|
|
490
562
|
exports.wLinkItemData,
|
|
491
563
|
],
|
|
492
564
|
];
|
|
493
|
-
exports.wMermaidItemData = {
|
|
494
|
-
id: action_names_1.ActionName.mermaid,
|
|
495
|
-
type: types_1.ToolbarDataType.SingleButton,
|
|
496
|
-
title: menubar_1.i18n.bind(null, 'mermaid'),
|
|
497
|
-
icon: icons_1.icons.mermaid,
|
|
498
|
-
exec: (e) => e.actions.createMermaid.run(),
|
|
499
|
-
isActive: (e) => e.actions.createMermaid.isActive(),
|
|
500
|
-
isEnable: (e) => e.actions.createMermaid.isEnable(),
|
|
501
|
-
};
|
|
502
565
|
exports.wToolbarConfigByPreset = {
|
|
503
|
-
zero: [exports.
|
|
566
|
+
zero: [[exports.wUndoItemData, exports.wRedoItemData]],
|
|
504
567
|
commonmark: [
|
|
505
|
-
exports.
|
|
568
|
+
[exports.wUndoItemData, exports.wRedoItemData],
|
|
506
569
|
[exports.wBoldItemData, exports.wItalicItemData],
|
|
507
570
|
[
|
|
508
|
-
|
|
509
|
-
|
|
571
|
+
{
|
|
572
|
+
id: 'heading',
|
|
573
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
574
|
+
icon: icons_1.icons.headline,
|
|
575
|
+
withArrow: true,
|
|
576
|
+
title: menubar_1.i18n.bind(null, 'heading'),
|
|
577
|
+
data: [
|
|
578
|
+
exports.wTextItemData,
|
|
579
|
+
exports.wHeading1ItemData,
|
|
580
|
+
exports.wHeading2ItemData,
|
|
581
|
+
exports.wHeading3ItemData,
|
|
582
|
+
exports.wHeading4ItemData,
|
|
583
|
+
exports.wHeading5ItemData,
|
|
584
|
+
exports.wHeading6ItemData,
|
|
585
|
+
],
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
id: 'list',
|
|
589
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
590
|
+
icon: icons_1.icons.bulletList,
|
|
591
|
+
withArrow: true,
|
|
592
|
+
title: menubar_1.i18n.bind(null, 'list'),
|
|
593
|
+
data: [
|
|
594
|
+
exports.wBulletListItemData,
|
|
595
|
+
exports.wOrderedListItemData,
|
|
596
|
+
exports.wSinkListItemData,
|
|
597
|
+
exports.wLiftListItemData,
|
|
598
|
+
],
|
|
599
|
+
},
|
|
510
600
|
exports.wLinkItemData,
|
|
511
601
|
exports.wQuoteItemData,
|
|
512
|
-
|
|
602
|
+
{
|
|
603
|
+
id: 'code',
|
|
604
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
605
|
+
icon: icons_1.icons.code,
|
|
606
|
+
withArrow: true,
|
|
607
|
+
title: menubar_1.i18n.bind(null, 'code'),
|
|
608
|
+
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
609
|
+
},
|
|
513
610
|
],
|
|
514
611
|
],
|
|
515
612
|
default: [
|
|
516
|
-
exports.
|
|
613
|
+
[exports.wUndoItemData, exports.wRedoItemData],
|
|
517
614
|
[exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData],
|
|
518
615
|
[
|
|
519
|
-
|
|
520
|
-
|
|
616
|
+
{
|
|
617
|
+
id: 'heading',
|
|
618
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
619
|
+
icon: icons_1.icons.headline,
|
|
620
|
+
withArrow: true,
|
|
621
|
+
title: menubar_1.i18n.bind(null, 'heading'),
|
|
622
|
+
data: [
|
|
623
|
+
exports.wTextItemData,
|
|
624
|
+
exports.wHeading1ItemData,
|
|
625
|
+
exports.wHeading2ItemData,
|
|
626
|
+
exports.wHeading3ItemData,
|
|
627
|
+
exports.wHeading4ItemData,
|
|
628
|
+
exports.wHeading5ItemData,
|
|
629
|
+
exports.wHeading6ItemData,
|
|
630
|
+
],
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
id: 'list',
|
|
634
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
635
|
+
icon: icons_1.icons.bulletList,
|
|
636
|
+
withArrow: true,
|
|
637
|
+
title: menubar_1.i18n.bind(null, 'list'),
|
|
638
|
+
data: [
|
|
639
|
+
exports.wBulletListItemData,
|
|
640
|
+
exports.wOrderedListItemData,
|
|
641
|
+
exports.wSinkListItemData,
|
|
642
|
+
exports.wLiftListItemData,
|
|
643
|
+
],
|
|
644
|
+
},
|
|
521
645
|
exports.wLinkItemData,
|
|
522
646
|
exports.wQuoteItemData,
|
|
523
|
-
|
|
647
|
+
{
|
|
648
|
+
id: 'code',
|
|
649
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
650
|
+
icon: icons_1.icons.code,
|
|
651
|
+
withArrow: true,
|
|
652
|
+
title: menubar_1.i18n.bind(null, 'code'),
|
|
653
|
+
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
654
|
+
},
|
|
524
655
|
],
|
|
525
656
|
],
|
|
526
657
|
yfm: [
|
|
527
|
-
exports.
|
|
658
|
+
[exports.wUndoItemData, exports.wRedoItemData],
|
|
528
659
|
[
|
|
529
660
|
exports.wBoldItemData,
|
|
530
661
|
exports.wItalicItemData,
|
|
@@ -533,13 +664,47 @@ exports.wToolbarConfigByPreset = {
|
|
|
533
664
|
exports.wMonospaceItemData,
|
|
534
665
|
],
|
|
535
666
|
[
|
|
536
|
-
|
|
537
|
-
|
|
667
|
+
{
|
|
668
|
+
id: 'heading',
|
|
669
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
670
|
+
icon: icons_1.icons.headline,
|
|
671
|
+
withArrow: true,
|
|
672
|
+
title: menubar_1.i18n.bind(null, 'heading'),
|
|
673
|
+
data: [
|
|
674
|
+
exports.wTextItemData,
|
|
675
|
+
exports.wHeading1ItemData,
|
|
676
|
+
exports.wHeading2ItemData,
|
|
677
|
+
exports.wHeading3ItemData,
|
|
678
|
+
exports.wHeading4ItemData,
|
|
679
|
+
exports.wHeading5ItemData,
|
|
680
|
+
exports.wHeading6ItemData,
|
|
681
|
+
],
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
id: 'list',
|
|
685
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
686
|
+
icon: icons_1.icons.bulletList,
|
|
687
|
+
withArrow: true,
|
|
688
|
+
title: menubar_1.i18n.bind(null, 'list'),
|
|
689
|
+
data: [
|
|
690
|
+
exports.wBulletListItemData,
|
|
691
|
+
exports.wOrderedListItemData,
|
|
692
|
+
exports.wSinkListItemData,
|
|
693
|
+
exports.wLiftListItemData,
|
|
694
|
+
],
|
|
695
|
+
},
|
|
538
696
|
exports.wLinkItemData,
|
|
539
697
|
exports.wNoteItemData,
|
|
540
698
|
exports.wCutItemData,
|
|
541
699
|
exports.wQuoteItemData,
|
|
542
|
-
|
|
700
|
+
{
|
|
701
|
+
id: 'code',
|
|
702
|
+
type: toolbar_1.ToolbarDataType.ListButton,
|
|
703
|
+
icon: icons_1.icons.code,
|
|
704
|
+
withArrow: true,
|
|
705
|
+
title: menubar_1.i18n.bind(null, 'code'),
|
|
706
|
+
data: [exports.wCodeItemData, exports.wCodeBlockItemData],
|
|
707
|
+
},
|
|
543
708
|
],
|
|
544
709
|
[exports.wImageItemData, exports.wFileItemData, exports.wTableItemData, exports.wCheckboxItemData],
|
|
545
710
|
],
|
|
@@ -548,24 +713,75 @@ exports.wToolbarConfigByPreset = {
|
|
|
548
713
|
exports.wCommandMenuConfigByPreset = {
|
|
549
714
|
zero: [],
|
|
550
715
|
commonmark: [
|
|
551
|
-
|
|
552
|
-
|
|
716
|
+
exports.wTextItemData,
|
|
717
|
+
exports.wHeading1ItemData,
|
|
718
|
+
exports.wHeading2ItemData,
|
|
719
|
+
exports.wHeading3ItemData,
|
|
720
|
+
exports.wHeading4ItemData,
|
|
721
|
+
exports.wHeading5ItemData,
|
|
722
|
+
exports.wHeading6ItemData,
|
|
723
|
+
exports.wBulletListItemData,
|
|
724
|
+
exports.wOrderedListItemData,
|
|
725
|
+
exports.wSinkListItemData,
|
|
726
|
+
exports.wLiftListItemData,
|
|
553
727
|
exports.wLinkItemData,
|
|
554
728
|
exports.wQuoteItemData,
|
|
555
729
|
exports.wCodeBlockItemData,
|
|
556
730
|
exports.wHruleItemData,
|
|
557
731
|
],
|
|
558
732
|
default: [
|
|
559
|
-
|
|
560
|
-
|
|
733
|
+
exports.wTextItemData,
|
|
734
|
+
exports.wHeading1ItemData,
|
|
735
|
+
exports.wHeading2ItemData,
|
|
736
|
+
exports.wHeading3ItemData,
|
|
737
|
+
exports.wHeading4ItemData,
|
|
738
|
+
exports.wHeading5ItemData,
|
|
739
|
+
exports.wHeading6ItemData,
|
|
740
|
+
exports.wBulletListItemData,
|
|
741
|
+
exports.wOrderedListItemData,
|
|
742
|
+
exports.wSinkListItemData,
|
|
743
|
+
exports.wLiftListItemData,
|
|
561
744
|
exports.wLinkItemData,
|
|
562
745
|
exports.wQuoteItemData,
|
|
563
746
|
exports.wCodeBlockItemData,
|
|
564
747
|
exports.wHruleItemData,
|
|
565
748
|
],
|
|
566
749
|
yfm: [
|
|
567
|
-
|
|
568
|
-
|
|
750
|
+
exports.wTextItemData,
|
|
751
|
+
exports.wHeading1ItemData,
|
|
752
|
+
exports.wHeading2ItemData,
|
|
753
|
+
exports.wHeading3ItemData,
|
|
754
|
+
exports.wHeading4ItemData,
|
|
755
|
+
exports.wHeading5ItemData,
|
|
756
|
+
exports.wHeading6ItemData,
|
|
757
|
+
exports.wBulletListItemData,
|
|
758
|
+
exports.wOrderedListItemData,
|
|
759
|
+
exports.wSinkListItemData,
|
|
760
|
+
exports.wLiftListItemData,
|
|
761
|
+
exports.wLinkItemData,
|
|
762
|
+
exports.wQuoteItemData,
|
|
763
|
+
exports.wNoteItemData,
|
|
764
|
+
exports.wCutItemData,
|
|
765
|
+
exports.wCodeBlockItemData,
|
|
766
|
+
exports.wCheckboxItemData,
|
|
767
|
+
exports.wTableItemData,
|
|
768
|
+
exports.wImageItemData,
|
|
769
|
+
exports.wHruleItemData,
|
|
770
|
+
exports.wFileItemData,
|
|
771
|
+
exports.wTabsItemData,
|
|
772
|
+
],
|
|
773
|
+
full: [
|
|
774
|
+
exports.wTextItemData,
|
|
775
|
+
exports.wHeading1ItemData,
|
|
776
|
+
exports.wHeading2ItemData,
|
|
777
|
+
exports.wHeading3ItemData,
|
|
778
|
+
exports.wHeading4ItemData,
|
|
779
|
+
exports.wHeading5ItemData,
|
|
780
|
+
exports.wHeading6ItemData,
|
|
781
|
+
exports.wBulletListItemData,
|
|
782
|
+
exports.wOrderedListItemData,
|
|
783
|
+
exports.wSinkListItemData,
|
|
784
|
+
exports.wLiftListItemData,
|
|
569
785
|
exports.wLinkItemData,
|
|
570
786
|
exports.wQuoteItemData,
|
|
571
787
|
exports.wNoteItemData,
|
|
@@ -575,10 +791,10 @@ exports.wCommandMenuConfigByPreset = {
|
|
|
575
791
|
exports.wTableItemData,
|
|
576
792
|
exports.wImageItemData,
|
|
577
793
|
exports.wHruleItemData,
|
|
794
|
+
exports.wEmojiItemData,
|
|
578
795
|
exports.wFileItemData,
|
|
579
796
|
exports.wTabsItemData,
|
|
580
797
|
],
|
|
581
|
-
full: exports.wCommandMenuConfig.slice(),
|
|
582
798
|
};
|
|
583
799
|
exports.wHiddenDataByPreset = {
|
|
584
800
|
zero: exports.wCommandMenuConfigByPreset.zero.slice(),
|
|
@@ -590,17 +806,17 @@ exports.wHiddenDataByPreset = {
|
|
|
590
806
|
exports.wSelectionMenuConfigByPreset = {
|
|
591
807
|
zero: [],
|
|
592
808
|
commonmark: [
|
|
593
|
-
[textContextItemData],
|
|
809
|
+
[exports.textContextItemData],
|
|
594
810
|
[exports.wBoldItemData, exports.wItalicItemData, exports.wCodeItemData],
|
|
595
811
|
[exports.wLinkItemData],
|
|
596
812
|
],
|
|
597
813
|
default: [
|
|
598
|
-
[textContextItemData],
|
|
814
|
+
[exports.textContextItemData],
|
|
599
815
|
[exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData, exports.wCodeItemData],
|
|
600
816
|
[exports.wLinkItemData],
|
|
601
817
|
],
|
|
602
818
|
yfm: [
|
|
603
|
-
[textContextItemData],
|
|
819
|
+
[exports.textContextItemData],
|
|
604
820
|
[exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData, exports.wMonospaceItemData, exports.wCodeItemData],
|
|
605
821
|
[exports.wLinkItemData],
|
|
606
822
|
],
|