@opentiny/fluent-editor 4.0.0-alpha.0 → 4.0.0-alpha.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/es/config/editor.config.es.js +0 -7
- package/es/config/editor.config.es.js.map +1 -1
- package/es/config/i18n/en-us.es.js +0 -13
- package/es/config/i18n/en-us.es.js.map +1 -1
- package/es/config/i18n/zh-cn.es.js +0 -13
- package/es/config/i18n/zh-cn.es.js.map +1 -1
- package/es/config/index.es.js +6 -11
- package/es/config/index.es.js.map +1 -1
- package/es/core/fluent-editor.es.js +3 -4
- package/es/core/fluent-editor.es.js.map +1 -1
- package/es/fluent-editor.es.js +12 -3
- package/es/fluent-editor.es.js.map +1 -1
- package/es/formats/video.es.js +2 -2
- package/es/formats/video.es.js.map +1 -1
- package/es/index.es.js +3 -2
- package/es/index.es.js.map +1 -1
- package/es/modules/custom-clipboard.es.js +3 -5
- package/es/modules/custom-clipboard.es.js.map +1 -1
- package/es/modules/custom-image/BlotFormatter.es.js +1 -2
- package/es/modules/custom-image/BlotFormatter.es.js.map +1 -1
- package/es/modules/custom-image/image.es.js +4 -16
- package/es/modules/custom-image/image.es.js.map +1 -1
- package/es/modules/custom-uploader.es.js +60 -193
- package/es/modules/custom-uploader.es.js.map +1 -1
- package/es/modules/file/formats/file.es.js +12 -14
- package/es/modules/file/formats/file.es.js.map +1 -1
- package/es/modules/file/index.es.js +6 -7
- package/es/modules/file/index.es.js.map +1 -1
- package/es/modules/i18n.es.js +28 -9
- package/es/modules/i18n.es.js.map +1 -1
- package/es/modules/link/modules/tooltip.es.js +3 -2
- package/es/modules/link/modules/tooltip.es.js.map +1 -1
- package/es/modules/shortcut-key/index.es.js +17 -1
- package/es/modules/shortcut-key/index.es.js.map +1 -1
- package/es/modules/table-up/index.es.js +5 -2
- package/es/modules/table-up/index.es.js.map +1 -1
- package/es/modules/toolbar/toolbar-tip.es.js +6 -1
- package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
- package/es/themes/snow.es.js +14 -5
- package/es/themes/snow.es.js.map +1 -1
- package/es/ui/icons.es.js.map +1 -1
- package/es/utils/is.es.js +4 -0
- package/es/utils/is.es.js.map +1 -1
- package/lib/config/editor.config.cjs.js +0 -7
- package/lib/config/editor.config.cjs.js.map +1 -1
- package/lib/config/i18n/en-us.cjs.js +0 -13
- package/lib/config/i18n/en-us.cjs.js.map +1 -1
- package/lib/config/i18n/zh-cn.cjs.js +0 -13
- package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
- package/lib/config/index.cjs.js +5 -10
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/core/fluent-editor.cjs.js +2 -3
- package/lib/core/fluent-editor.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js +11 -2
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/formats/video.cjs.js +2 -2
- package/lib/formats/video.cjs.js.map +1 -1
- package/lib/index.cjs.js +2 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/modules/custom-clipboard.cjs.js +2 -4
- package/lib/modules/custom-clipboard.cjs.js.map +1 -1
- package/lib/modules/custom-image/BlotFormatter.cjs.js +0 -1
- package/lib/modules/custom-image/BlotFormatter.cjs.js.map +1 -1
- package/lib/modules/custom-image/image.cjs.js +4 -16
- package/lib/modules/custom-image/image.cjs.js.map +1 -1
- package/lib/modules/custom-uploader.cjs.js +61 -194
- package/lib/modules/custom-uploader.cjs.js.map +1 -1
- package/lib/modules/file/formats/file.cjs.js +12 -14
- package/lib/modules/file/formats/file.cjs.js.map +1 -1
- package/lib/modules/file/index.cjs.js +6 -7
- package/lib/modules/file/index.cjs.js.map +1 -1
- package/lib/modules/i18n.cjs.js +27 -8
- package/lib/modules/i18n.cjs.js.map +1 -1
- package/lib/modules/link/modules/tooltip.cjs.js +2 -1
- package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
- package/lib/modules/shortcut-key/index.cjs.js +16 -0
- package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
- package/lib/modules/table-up/index.cjs.js +5 -2
- package/lib/modules/table-up/index.cjs.js.map +1 -1
- package/lib/modules/toolbar/toolbar-tip.cjs.js +6 -1
- package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
- package/lib/themes/snow.cjs.js +14 -5
- package/lib/themes/snow.cjs.js.map +1 -1
- package/lib/ui/icons.cjs.js.map +1 -1
- package/lib/utils/is.cjs.js +4 -0
- package/lib/utils/is.cjs.js.map +1 -1
- package/package.json +2 -2
- package/style.css +6 -19
- package/types/config/editor.config.d.ts +0 -274
- package/types/config/i18n/en-us.d.ts +0 -13
- package/types/config/i18n/zh-cn.d.ts +0 -13
- package/types/config/index.d.ts +1 -1
- package/types/config/types/editor-config.interface.d.ts +0 -19
- package/types/config/types/editor-modules.interface.d.ts +2 -0
- package/types/core/fluent-editor.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/modules/counter.d.ts +1 -1
- package/types/modules/custom-clipboard.d.ts +1 -1
- package/types/modules/custom-image/image.d.ts +8 -11
- package/types/modules/file/formats/file.d.ts +12 -8
- package/types/modules/file/index.d.ts +5 -5
- package/types/modules/i18n.d.ts +3 -3
- package/types/modules/shortcut-key/index.d.ts +4 -33
- package/types/modules/table-up/index.d.ts +26 -26
- package/types/utils/is.d.ts +2 -0
- package/types/modules/custom-uploader.d.ts +0 -31
|
@@ -1,278 +1,4 @@
|
|
|
1
1
|
export declare const BIG_DELTA_LIMIT = 2000;
|
|
2
|
-
export declare const LANG_CONF: {
|
|
3
|
-
'en-US': {
|
|
4
|
-
header: string;
|
|
5
|
-
normal: string;
|
|
6
|
-
h1: string;
|
|
7
|
-
h2: string;
|
|
8
|
-
h3: string;
|
|
9
|
-
h4: string;
|
|
10
|
-
h5: string;
|
|
11
|
-
h6: string;
|
|
12
|
-
'line-height': string;
|
|
13
|
-
songti: string;
|
|
14
|
-
yahei: string;
|
|
15
|
-
kaiti: string;
|
|
16
|
-
heiti: string;
|
|
17
|
-
lishu: string;
|
|
18
|
-
left: string;
|
|
19
|
-
center: string;
|
|
20
|
-
right: string;
|
|
21
|
-
codeblock: string;
|
|
22
|
-
globallink: string;
|
|
23
|
-
'exit-fullscreen': string;
|
|
24
|
-
help: string;
|
|
25
|
-
more: string;
|
|
26
|
-
'help-format': string;
|
|
27
|
-
'help-insert': string;
|
|
28
|
-
'help-operation': string;
|
|
29
|
-
mention: string;
|
|
30
|
-
'quick-menu': string;
|
|
31
|
-
'toggle-help-panel': string;
|
|
32
|
-
'scroll-table': string;
|
|
33
|
-
'mouse-wheel': string;
|
|
34
|
-
save: string;
|
|
35
|
-
'copy-cells': string;
|
|
36
|
-
'copy-table': string;
|
|
37
|
-
'cut-cells': string;
|
|
38
|
-
'empty-cells': string;
|
|
39
|
-
'insert-row-up': string;
|
|
40
|
-
'insert-row-down': string;
|
|
41
|
-
'insert-column-left': string;
|
|
42
|
-
'insert-column-right': string;
|
|
43
|
-
'merge-cells': string;
|
|
44
|
-
'unmerge-cells': string;
|
|
45
|
-
'delete-row': string;
|
|
46
|
-
'delete-column': string;
|
|
47
|
-
'delete-table': string;
|
|
48
|
-
'default-link-text': string;
|
|
49
|
-
basicblock: string;
|
|
50
|
-
linkplaceholder: string;
|
|
51
|
-
'counter-template': string;
|
|
52
|
-
char: string;
|
|
53
|
-
word: string;
|
|
54
|
-
'counter-limit-tips': string;
|
|
55
|
-
'ie-msg': string;
|
|
56
|
-
loading: string;
|
|
57
|
-
pasting: string;
|
|
58
|
-
'img-error': string;
|
|
59
|
-
'img-error-info': string;
|
|
60
|
-
'last-modified': string;
|
|
61
|
-
screenshot: string;
|
|
62
|
-
uploading: string;
|
|
63
|
-
'sub-title-bg-color': string;
|
|
64
|
-
emoji: string;
|
|
65
|
-
fullscreen: string;
|
|
66
|
-
blockquote: string;
|
|
67
|
-
undo: string;
|
|
68
|
-
redo: string;
|
|
69
|
-
clean: string;
|
|
70
|
-
bold: string;
|
|
71
|
-
italic: string;
|
|
72
|
-
underline: string;
|
|
73
|
-
strike: string;
|
|
74
|
-
image: string;
|
|
75
|
-
file: string;
|
|
76
|
-
link: string;
|
|
77
|
-
code: string;
|
|
78
|
-
table: string;
|
|
79
|
-
'table-up': string;
|
|
80
|
-
'code-block': string;
|
|
81
|
-
formula: string;
|
|
82
|
-
'format-painter': string;
|
|
83
|
-
divider: string;
|
|
84
|
-
video: string;
|
|
85
|
-
color: string;
|
|
86
|
-
background: string;
|
|
87
|
-
font: string;
|
|
88
|
-
size: string;
|
|
89
|
-
list: string;
|
|
90
|
-
'list-ordered': string;
|
|
91
|
-
'list-bullet': string;
|
|
92
|
-
'list-check': string;
|
|
93
|
-
'align-left': string;
|
|
94
|
-
'align-center': string;
|
|
95
|
-
'align-right': string;
|
|
96
|
-
'align-justify': string;
|
|
97
|
-
'direction-ltr': string;
|
|
98
|
-
'direction-rtl': string;
|
|
99
|
-
'indent--1': string;
|
|
100
|
-
'indent-+1': string;
|
|
101
|
-
'script-super': string;
|
|
102
|
-
'script-sub': string;
|
|
103
|
-
'header-normal': string;
|
|
104
|
-
'header-1': string;
|
|
105
|
-
'header-2': string;
|
|
106
|
-
'header-3': string;
|
|
107
|
-
'header-4': string;
|
|
108
|
-
'header-5': string;
|
|
109
|
-
'header-6': string;
|
|
110
|
-
'header-list': string;
|
|
111
|
-
'input-recall-menu-placeholder': string;
|
|
112
|
-
'clear-color': string;
|
|
113
|
-
'custom-color': string;
|
|
114
|
-
fullCheckboxText: string;
|
|
115
|
-
customBtnText: string;
|
|
116
|
-
confirmText: string;
|
|
117
|
-
cancelText: string;
|
|
118
|
-
rowText: string;
|
|
119
|
-
colText: string;
|
|
120
|
-
notPositiveNumberError: string;
|
|
121
|
-
custom: string;
|
|
122
|
-
clear: string;
|
|
123
|
-
transparent: string;
|
|
124
|
-
perWidthInsufficient: string;
|
|
125
|
-
CopyCell: string;
|
|
126
|
-
CutCell: string;
|
|
127
|
-
InsertTop: string;
|
|
128
|
-
InsertRight: string;
|
|
129
|
-
InsertBottom: string;
|
|
130
|
-
InsertLeft: string;
|
|
131
|
-
MergeCell: string;
|
|
132
|
-
SplitCell: string;
|
|
133
|
-
DeleteRow: string;
|
|
134
|
-
DeleteColumn: string;
|
|
135
|
-
DeleteTable: string;
|
|
136
|
-
BackgroundColor: string;
|
|
137
|
-
BorderColor: string;
|
|
138
|
-
};
|
|
139
|
-
'zh-CN': {
|
|
140
|
-
header: string;
|
|
141
|
-
normal: string;
|
|
142
|
-
h1: string;
|
|
143
|
-
h2: string;
|
|
144
|
-
h3: string;
|
|
145
|
-
h4: string;
|
|
146
|
-
h5: string;
|
|
147
|
-
h6: string;
|
|
148
|
-
'line-height': string;
|
|
149
|
-
songti: string;
|
|
150
|
-
yahei: string;
|
|
151
|
-
kaiti: string;
|
|
152
|
-
heiti: string;
|
|
153
|
-
lishu: string;
|
|
154
|
-
left: string;
|
|
155
|
-
center: string;
|
|
156
|
-
right: string;
|
|
157
|
-
codeblock: string;
|
|
158
|
-
globallink: string;
|
|
159
|
-
'exit-fullscreen': string;
|
|
160
|
-
help: string;
|
|
161
|
-
more: string;
|
|
162
|
-
'help-format': string;
|
|
163
|
-
'help-insert': string;
|
|
164
|
-
'help-operation': string;
|
|
165
|
-
mention: string;
|
|
166
|
-
'quick-menu': string;
|
|
167
|
-
'toggle-help-panel': string;
|
|
168
|
-
'scroll-table': string;
|
|
169
|
-
'mouse-wheel': string;
|
|
170
|
-
save: string;
|
|
171
|
-
'copy-cells': string;
|
|
172
|
-
'copy-table': string;
|
|
173
|
-
'cut-cells': string;
|
|
174
|
-
'empty-cells': string;
|
|
175
|
-
'insert-row-up': string;
|
|
176
|
-
'insert-row-down': string;
|
|
177
|
-
'insert-column-left': string;
|
|
178
|
-
'insert-column-right': string;
|
|
179
|
-
'merge-cells': string;
|
|
180
|
-
'unmerge-cells': string;
|
|
181
|
-
'delete-row': string;
|
|
182
|
-
'delete-column': string;
|
|
183
|
-
'delete-table': string;
|
|
184
|
-
'default-link-text': string;
|
|
185
|
-
basicblock: string;
|
|
186
|
-
linkplaceholder: string;
|
|
187
|
-
'counter-template': string;
|
|
188
|
-
char: string;
|
|
189
|
-
word: string;
|
|
190
|
-
'counter-limit-tips': string;
|
|
191
|
-
'ie-msg': string;
|
|
192
|
-
loading: string;
|
|
193
|
-
pasting: string;
|
|
194
|
-
'img-error': string;
|
|
195
|
-
'img-error-info': string;
|
|
196
|
-
'last-modified': string;
|
|
197
|
-
screenshot: string;
|
|
198
|
-
uploading: string;
|
|
199
|
-
'sub-title-bg-color': string;
|
|
200
|
-
emoji: string;
|
|
201
|
-
fullscreen: string;
|
|
202
|
-
blockquote: string;
|
|
203
|
-
undo: string;
|
|
204
|
-
redo: string;
|
|
205
|
-
clean: string;
|
|
206
|
-
bold: string;
|
|
207
|
-
italic: string;
|
|
208
|
-
underline: string;
|
|
209
|
-
strike: string;
|
|
210
|
-
image: string;
|
|
211
|
-
file: string;
|
|
212
|
-
link: string;
|
|
213
|
-
divider: string;
|
|
214
|
-
code: string;
|
|
215
|
-
table: string;
|
|
216
|
-
'table-up': string;
|
|
217
|
-
'code-block': string;
|
|
218
|
-
formula: string;
|
|
219
|
-
'format-painter': string;
|
|
220
|
-
video: string;
|
|
221
|
-
color: string;
|
|
222
|
-
background: string;
|
|
223
|
-
font: string;
|
|
224
|
-
size: string;
|
|
225
|
-
list: string;
|
|
226
|
-
'list-ordered': string;
|
|
227
|
-
'list-bullet': string;
|
|
228
|
-
'list-check': string;
|
|
229
|
-
'align-left': string;
|
|
230
|
-
'align-center': string;
|
|
231
|
-
'align-right': string;
|
|
232
|
-
'align-justify': string;
|
|
233
|
-
'direction-ltr': string;
|
|
234
|
-
'direction-rtl': string;
|
|
235
|
-
'indent--1': string;
|
|
236
|
-
'indent-+1': string;
|
|
237
|
-
'script-super': string;
|
|
238
|
-
'script-sub': string;
|
|
239
|
-
'header-normal': string;
|
|
240
|
-
'header-1': string;
|
|
241
|
-
'header-2': string;
|
|
242
|
-
'header-3': string;
|
|
243
|
-
'header-4': string;
|
|
244
|
-
'header-5': string;
|
|
245
|
-
'header-6': string;
|
|
246
|
-
'header-list': string;
|
|
247
|
-
'input-recall-menu-placeholder': string;
|
|
248
|
-
'clear-color': string;
|
|
249
|
-
'custom-color': string;
|
|
250
|
-
fullCheckboxText: string;
|
|
251
|
-
customBtnText: string;
|
|
252
|
-
confirmText: string;
|
|
253
|
-
cancelText: string;
|
|
254
|
-
rowText: string;
|
|
255
|
-
colText: string;
|
|
256
|
-
notPositiveNumberError: string;
|
|
257
|
-
custom: string;
|
|
258
|
-
clear: string;
|
|
259
|
-
transparent: string;
|
|
260
|
-
perWidthInsufficient: string;
|
|
261
|
-
CopyCell: string;
|
|
262
|
-
CutCell: string;
|
|
263
|
-
InsertTop: string;
|
|
264
|
-
InsertRight: string;
|
|
265
|
-
InsertBottom: string;
|
|
266
|
-
InsertLeft: string;
|
|
267
|
-
MergeCell: string;
|
|
268
|
-
SplitCell: string;
|
|
269
|
-
DeleteRow: string;
|
|
270
|
-
DeleteColumn: string;
|
|
271
|
-
DeleteTable: string;
|
|
272
|
-
BackgroundColor: string;
|
|
273
|
-
BorderColor: string;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
2
|
export declare const CHANGE_LANGUAGE_EVENT = "change-language";
|
|
277
3
|
export declare const defaultLanguage = "en-US";
|
|
278
4
|
export declare const IMAGE_UPLOADER_MIME_TYPES: string[];
|
|
@@ -30,19 +30,6 @@ export declare const EN_US: {
|
|
|
30
30
|
'scroll-table': string;
|
|
31
31
|
'mouse-wheel': string;
|
|
32
32
|
save: string;
|
|
33
|
-
'copy-cells': string;
|
|
34
|
-
'copy-table': string;
|
|
35
|
-
'cut-cells': string;
|
|
36
|
-
'empty-cells': string;
|
|
37
|
-
'insert-row-up': string;
|
|
38
|
-
'insert-row-down': string;
|
|
39
|
-
'insert-column-left': string;
|
|
40
|
-
'insert-column-right': string;
|
|
41
|
-
'merge-cells': string;
|
|
42
|
-
'unmerge-cells': string;
|
|
43
|
-
'delete-row': string;
|
|
44
|
-
'delete-column': string;
|
|
45
|
-
'delete-table': string;
|
|
46
33
|
'default-link-text': string;
|
|
47
34
|
basicblock: string;
|
|
48
35
|
linkplaceholder: string;
|
|
@@ -30,19 +30,6 @@ export declare const ZH_CN: {
|
|
|
30
30
|
'scroll-table': string;
|
|
31
31
|
'mouse-wheel': string;
|
|
32
32
|
save: string;
|
|
33
|
-
'copy-cells': string;
|
|
34
|
-
'copy-table': string;
|
|
35
|
-
'cut-cells': string;
|
|
36
|
-
'empty-cells': string;
|
|
37
|
-
'insert-row-up': string;
|
|
38
|
-
'insert-row-down': string;
|
|
39
|
-
'insert-column-left': string;
|
|
40
|
-
'insert-column-right': string;
|
|
41
|
-
'merge-cells': string;
|
|
42
|
-
'unmerge-cells': string;
|
|
43
|
-
'delete-row': string;
|
|
44
|
-
'delete-column': string;
|
|
45
|
-
'delete-table': string;
|
|
46
33
|
'default-link-text': string;
|
|
47
34
|
basicblock: string;
|
|
48
35
|
linkplaceholder: string;
|
package/types/config/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './editor.config';
|
|
2
2
|
export * from './editor.utils';
|
|
3
|
-
export declare function inputFile(type:
|
|
3
|
+
export declare function inputFile(type: 'image' | 'video' | 'file', accept: string[]): void;
|
|
4
4
|
export declare function getListValue(value: any, preListValue: any): any;
|
|
5
5
|
/** css namespace */
|
|
6
6
|
export declare const namespace = "fe";
|
|
@@ -11,25 +11,6 @@ export interface IEditorConfig extends QuillOptions {
|
|
|
11
11
|
trackChanges?: 'user' | 'all';
|
|
12
12
|
autoProtocol?: boolean | string;
|
|
13
13
|
editorPaste?: any;
|
|
14
|
-
uploadOption?: {
|
|
15
|
-
imageUpload?: ({ file, callback, editor }: {
|
|
16
|
-
file: any;
|
|
17
|
-
callback: any;
|
|
18
|
-
editor: any;
|
|
19
|
-
}) => void;
|
|
20
|
-
imageAccept?: Array<string>[] | string;
|
|
21
|
-
fileAccept?: Array<string>[] | string;
|
|
22
|
-
fileUpload: ({ file, callback, editor }: {
|
|
23
|
-
file: any;
|
|
24
|
-
callback: any;
|
|
25
|
-
editor: any;
|
|
26
|
-
}) => void;
|
|
27
|
-
isVideoPlay?: boolean;
|
|
28
|
-
maxSize?: number;
|
|
29
|
-
success?: (file: File) => void;
|
|
30
|
-
fail?: (file: File) => void;
|
|
31
|
-
multiple?: boolean;
|
|
32
|
-
};
|
|
33
14
|
screenshot?: Partial<ScreenShotOptions>;
|
|
34
15
|
i18n?: {
|
|
35
16
|
lang?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FileUploaderOptions } from '../../modules/custom-uploader';
|
|
1
2
|
import { ToolbarOption } from './type';
|
|
2
3
|
|
|
3
4
|
export interface IEditorModules {
|
|
@@ -28,4 +29,5 @@ export interface IEditorModules {
|
|
|
28
29
|
[key: string]: any;
|
|
29
30
|
};
|
|
30
31
|
} | boolean;
|
|
32
|
+
uploader?: boolean | Partial<FileUploaderOptions>;
|
|
31
33
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ExpandedQuillOptions, default as Quill } from 'quill';
|
|
2
2
|
import { IEditorConfig } from '../config/types';
|
|
3
|
+
import { FileUploader } from '../modules/custom-uploader';
|
|
3
4
|
|
|
4
5
|
declare class FluentEditor extends Quill {
|
|
5
6
|
isFullscreen: boolean;
|
|
6
7
|
options: IEditorConfig & ExpandedQuillOptions;
|
|
8
|
+
uploader: FileUploader;
|
|
7
9
|
static register(...args: any[]): void;
|
|
8
10
|
get lang(): string;
|
|
9
11
|
constructor(container: HTMLElement | string, options?: IEditorConfig);
|
|
10
|
-
getLangText(name: string):
|
|
12
|
+
getLangText(name: string): string;
|
|
11
13
|
}
|
|
12
14
|
export type { Module, Parchment as TypeParchment, } from 'quill';
|
|
13
15
|
export default FluentEditor;
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as FluentEditor } from './fluent-editor';
|
|
2
2
|
|
|
3
3
|
export * from './config';
|
|
4
|
+
export { I18N } from './modules/i18n';
|
|
4
5
|
export * from './modules/table-up';
|
|
5
6
|
export * from './modules/toolbar/toolbar-tip';
|
|
6
|
-
export { generateTableUpShortKeyMenu } from 'quill-shortcut-key';
|
|
7
7
|
export default FluentEditor;
|
|
8
|
+
export { generateTableUpShortKeyMenu } from 'quill-shortcut-key';
|
|
@@ -16,7 +16,7 @@ declare class CustomClipboard extends Clipboard {
|
|
|
16
16
|
files: any;
|
|
17
17
|
rtf: any;
|
|
18
18
|
}): void;
|
|
19
|
-
files2urls(files:
|
|
19
|
+
files2urls(files: File[], placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<unknown[]>;
|
|
20
20
|
flipFilesArray(filesArr: any): any[][];
|
|
21
21
|
convertHexToBase64(hexString: any): string;
|
|
22
22
|
extractImageDataFromRtf(rtfData: any): any[];
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { default as TypeEmbed } from 'quill/blots/embed';
|
|
2
|
+
|
|
3
|
+
declare const Embed: typeof TypeEmbed;
|
|
4
|
+
export type ImageValue = string | {
|
|
5
|
+
src: string;
|
|
6
|
+
};
|
|
3
7
|
declare class CustomImage extends Embed {
|
|
4
8
|
static ID_SEED: number;
|
|
5
9
|
static blotName: string;
|
|
@@ -8,7 +12,7 @@ declare class CustomImage extends Embed {
|
|
|
8
12
|
parent: any;
|
|
9
13
|
scroll: any;
|
|
10
14
|
next: any;
|
|
11
|
-
static create(value:
|
|
15
|
+
static create(value: ImageValue): HTMLElement;
|
|
12
16
|
static formats(domNode: any): {};
|
|
13
17
|
static match(url: any): boolean;
|
|
14
18
|
static register(): void;
|
|
@@ -18,11 +22,4 @@ declare class CustomImage extends Embed {
|
|
|
18
22
|
unWrap(): void;
|
|
19
23
|
wrap(name: any, value: any): any;
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
static tagName: string;
|
|
23
|
-
static className: string;
|
|
24
|
-
static blotName: string;
|
|
25
|
-
static allowedChildren: typeof CustomImage[];
|
|
26
|
-
constructor(scroll: any, domNode: any);
|
|
27
|
-
}
|
|
28
|
-
export { CustomImage as default, CustomImageContainer as ImageContainerBlot };
|
|
25
|
+
export { CustomImage as default };
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as TypeEmbed } from 'quill/blots/embed';
|
|
2
|
+
|
|
3
|
+
declare const Embed: typeof TypeEmbed;
|
|
4
|
+
export interface FileValue {
|
|
5
|
+
size: number;
|
|
6
|
+
src: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
2
9
|
declare class File extends Embed {
|
|
3
10
|
static blotName: string;
|
|
4
11
|
static tagName: string;
|
|
5
12
|
static className: string;
|
|
6
13
|
static PROTOCOL_WHITELIST: string[];
|
|
7
|
-
|
|
8
|
-
domNode:
|
|
9
|
-
static
|
|
10
|
-
static
|
|
11
|
-
static formats(domNode: any): any;
|
|
12
|
-
static getFormats(domNode: any): any;
|
|
13
|
-
static sanitize(url: any): any;
|
|
14
|
+
static create(value: FileValue): HTMLAnchorElement;
|
|
15
|
+
static value(domNode: HTMLAnchorElement): Record<string, string>;
|
|
16
|
+
static getFormats(domNode: HTMLAnchorElement): Record<string, string>;
|
|
17
|
+
static sanitize(url: string): string;
|
|
14
18
|
}
|
|
15
19
|
export default File;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { default as FluentEditor } from '../../core/fluent-editor';
|
|
1
2
|
import { default as FileBar } from './modules/file-bar';
|
|
2
3
|
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
quill: any;
|
|
4
|
+
declare class FileModule {
|
|
5
|
+
quill: FluentEditor;
|
|
6
6
|
fileBar: FileBar;
|
|
7
7
|
static register(): void;
|
|
8
|
-
constructor(quill:
|
|
9
|
-
clickEvent(event:
|
|
8
|
+
constructor(quill: FluentEditor);
|
|
9
|
+
clickEvent(event: MouseEvent): void;
|
|
10
10
|
}
|
|
11
11
|
export default FileModule;
|
package/types/modules/i18n.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { default as FluentEditor } from '../fluent-editor';
|
|
|
2
2
|
|
|
3
3
|
interface I18NOptions {
|
|
4
4
|
lang: string;
|
|
5
|
-
langText: Record<string, string>;
|
|
6
5
|
}
|
|
7
|
-
declare class I18N {
|
|
6
|
+
export declare class I18N {
|
|
8
7
|
quill: FluentEditor;
|
|
9
|
-
|
|
8
|
+
static register(inputLangs: Record<string, Record<string, string>>, isCover?: boolean): void;
|
|
9
|
+
static parserText(text: string, lang: string): string;
|
|
10
10
|
options: I18NOptions;
|
|
11
11
|
constructor(quill: FluentEditor, options: Partial<I18NOptions>);
|
|
12
12
|
resolveLanguageOption(options: Partial<I18NOptions>): I18NOptions;
|
|
@@ -12,42 +12,13 @@ export declare class ShortCutKey extends QuillShortcutKey {
|
|
|
12
12
|
quill: FluentEditor;
|
|
13
13
|
options: ShortCutKeyOptions;
|
|
14
14
|
constructor(quill: FluentEditor, options: Partial<ShortCutKeyInputOptions>);
|
|
15
|
-
resolveOptions(options: Partial<ShortCutKeyInputOptions>):
|
|
16
|
-
placeholder: any;
|
|
17
|
-
menuItems: ({
|
|
18
|
-
type: "item";
|
|
19
|
-
name: string;
|
|
20
|
-
alias: string[];
|
|
21
|
-
icon: any;
|
|
22
|
-
title: any;
|
|
23
|
-
onClick(this: Quill, range: Range, _: any): void;
|
|
24
|
-
hideSearch?: undefined;
|
|
25
|
-
children?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
type: "group";
|
|
28
|
-
name: string;
|
|
29
|
-
alias: any[];
|
|
30
|
-
hideSearch: boolean;
|
|
31
|
-
icon: any;
|
|
32
|
-
title: any;
|
|
33
|
-
children: {
|
|
34
|
-
type: "item";
|
|
35
|
-
name: string;
|
|
36
|
-
alias: string[];
|
|
37
|
-
icon: any;
|
|
38
|
-
title: any;
|
|
39
|
-
onClick: (this: Quill, range: Range) => void;
|
|
40
|
-
}[];
|
|
41
|
-
})[];
|
|
42
|
-
isMenuItemsAdd: boolean;
|
|
43
|
-
menuKeyboardControls: () => false;
|
|
44
|
-
} & Partial<ShortCutKeyInputOptions>;
|
|
15
|
+
resolveOptions(options: Partial<ShortCutKeyInputOptions>): ShortCutKeyOptions;
|
|
45
16
|
defaultMenuList(): ({
|
|
46
17
|
type: "item";
|
|
47
18
|
name: string;
|
|
48
19
|
alias: string[];
|
|
49
20
|
icon: any;
|
|
50
|
-
title:
|
|
21
|
+
title: string;
|
|
51
22
|
onClick(this: Quill, range: Range | null, _: any): void;
|
|
52
23
|
hideSearch?: undefined;
|
|
53
24
|
children?: undefined;
|
|
@@ -57,13 +28,13 @@ export declare class ShortCutKey extends QuillShortcutKey {
|
|
|
57
28
|
alias: any[];
|
|
58
29
|
hideSearch: boolean;
|
|
59
30
|
icon: any;
|
|
60
|
-
title:
|
|
31
|
+
title: string;
|
|
61
32
|
children: {
|
|
62
33
|
type: "item";
|
|
63
34
|
name: string;
|
|
64
35
|
alias: string[];
|
|
65
36
|
icon: any;
|
|
66
|
-
title:
|
|
37
|
+
title: string;
|
|
67
38
|
onClick: (this: Quill, range: Range | null) => void;
|
|
68
39
|
}[];
|
|
69
40
|
})[];
|
|
@@ -35,32 +35,32 @@ export declare function generateTableUp(QuillTableUp: Constructor): {
|
|
|
35
35
|
[x: string]: any;
|
|
36
36
|
tableSelection?: InternalTableSelectionModule;
|
|
37
37
|
quill: FluentEditor;
|
|
38
|
-
resolveTexts(options
|
|
39
|
-
fullCheckboxText:
|
|
40
|
-
customBtnText:
|
|
41
|
-
confirmText:
|
|
42
|
-
cancelText:
|
|
43
|
-
rowText:
|
|
44
|
-
colText:
|
|
45
|
-
notPositiveNumberError:
|
|
46
|
-
custom:
|
|
47
|
-
clear:
|
|
48
|
-
transparent:
|
|
49
|
-
perWidthInsufficient:
|
|
50
|
-
CopyCell:
|
|
51
|
-
CutCell:
|
|
52
|
-
InsertTop:
|
|
53
|
-
InsertRight:
|
|
54
|
-
InsertBottom:
|
|
55
|
-
InsertLeft:
|
|
56
|
-
MergeCell:
|
|
57
|
-
SplitCell:
|
|
58
|
-
DeleteRow:
|
|
59
|
-
DeleteColumn:
|
|
60
|
-
DeleteTable:
|
|
61
|
-
BackgroundColor:
|
|
62
|
-
BorderColor:
|
|
63
|
-
}
|
|
38
|
+
resolveTexts(options?: Partial<Record<string, string>>): {
|
|
39
|
+
fullCheckboxText: string;
|
|
40
|
+
customBtnText: string;
|
|
41
|
+
confirmText: string;
|
|
42
|
+
cancelText: string;
|
|
43
|
+
rowText: string;
|
|
44
|
+
colText: string;
|
|
45
|
+
notPositiveNumberError: string;
|
|
46
|
+
custom: string;
|
|
47
|
+
clear: string;
|
|
48
|
+
transparent: string;
|
|
49
|
+
perWidthInsufficient: string;
|
|
50
|
+
CopyCell: string;
|
|
51
|
+
CutCell: string;
|
|
52
|
+
InsertTop: string;
|
|
53
|
+
InsertRight: string;
|
|
54
|
+
InsertBottom: string;
|
|
55
|
+
InsertLeft: string;
|
|
56
|
+
MergeCell: string;
|
|
57
|
+
SplitCell: string;
|
|
58
|
+
DeleteRow: string;
|
|
59
|
+
DeleteColumn: string;
|
|
60
|
+
DeleteTable: string;
|
|
61
|
+
BackgroundColor: string;
|
|
62
|
+
BorderColor: string;
|
|
63
|
+
};
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
export {};
|
package/types/utils/is.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export declare function isObject(value: unknown): value is object;
|
|
|
2
2
|
export declare const isUndefined: (val: unknown) => val is undefined;
|
|
3
3
|
export declare const isFunction: (val: unknown) => val is Function;
|
|
4
4
|
export declare const isString: (val: unknown) => val is string;
|
|
5
|
+
export declare const isBoolean: (val: unknown) => val is boolean;
|
|
6
|
+
export declare const isArray: (arg: any) => arg is any[];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Range } from 'quill/core/quill';
|
|
2
|
-
|
|
3
|
-
interface InsertFileData {
|
|
4
|
-
code: number;
|
|
5
|
-
message?: string;
|
|
6
|
-
data: {
|
|
7
|
-
title: string;
|
|
8
|
-
size: number;
|
|
9
|
-
src: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
declare const Uploader: unknown;
|
|
13
|
-
declare class CustomUploader extends Uploader {
|
|
14
|
-
quill: any;
|
|
15
|
-
options: any;
|
|
16
|
-
upload(range: any, files: any, isFile?: any): void;
|
|
17
|
-
isAllowedFileSize: (maxSize: number, file: File) => boolean;
|
|
18
|
-
isAllowedFileType: (accept: Array<string> | string, file: File) => boolean;
|
|
19
|
-
handleUploadFile(range: any, files: any, _hasRejectedFile: any): void;
|
|
20
|
-
insertFileToEditor(range: Range, file: File, { code, message, data }: InsertFileData): void;
|
|
21
|
-
insertImageToEditor(range: any, { code, message, data }: {
|
|
22
|
-
code: any;
|
|
23
|
-
message: any;
|
|
24
|
-
data: any;
|
|
25
|
-
}): void;
|
|
26
|
-
handleUploadImage(range: any, { file, files }: {
|
|
27
|
-
file: any;
|
|
28
|
-
files: any;
|
|
29
|
-
}, hasRejectedImage: any): void;
|
|
30
|
-
}
|
|
31
|
-
export default CustomUploader;
|