forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoolbar-settings-model.d.ts
624 lines (529 loc) · 15 KB
/
toolbar-settings-model.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { AjaxSettings, AjaxSettingsModel, ContextMenuSettings, ContextMenuSettingsModel } from '@syncfusion/ej2-filemanager';import { DetailsViewSettings, DetailsViewSettingsModel, NavigationPaneSettings } from '@syncfusion/ej2-filemanager';import { NavigationPaneSettingsModel, SearchSettings, SearchSettingsModel, SortOrder } from '@syncfusion/ej2-filemanager';import { ToolbarSettingsModel as FileToolbarSettingsModel, ToolbarSettings as FileToolbarSettings } from '@syncfusion/ej2-filemanager';import { UploadSettings, UploadSettingsModel, ViewType } from '@syncfusion/ej2-filemanager';import { SaveFormat } from '../../common';import { TableStyleItems } from '../models/items';import { ToolbarType, ActionOnScroll, ToolbarItems } from '../base/enum';import { IToolbarItems, IDropDownItemModel, ColorModeType, IToolsItemConfigs } from '../base/interface';
/**
* Interface for a class ToolbarSettings
*/
export interface ToolbarSettingsModel {
/**
* Specifies whether to render toolbar in RichTextEditor.
*
* @default true
*/
enable?: boolean;
/**
* Specifies whether to enable/disable floating toolbar.
*
* @default true
*/
enableFloating?: boolean;
/**
* Specifies the Toolbar display types.
* The possible types are:
* - Expand: Toolbar items placed within the available space and rest of the items are placed to the extended menu section.
* - MultiRow: Toolbar which placed at top of Rich Text Editor editing area.
* - Scrollable: All the toolbar items are displayed in a single line with horizontal scrolling enabled.
*
* @default Expand
*/
type?: ToolbarType;
/**
* An array of string or object that is used to configure items.
*
* @default ['Bold', 'Italic', 'Underline', '|', 'Formats', 'Alignments', 'OrderedList',
* 'UnorderedList', '|', 'CreateLink', 'Image', '|', 'SourceCode', 'Undo', 'Redo']
*/
items?: (string | IToolbarItems)[];
/**
* Using this property, Modify the default toolbar item configuration like icon class.
*
* @default {}
*/
itemConfigs?: { [key in ToolbarItems]?: IToolsItemConfigs };
}
/**
* Interface for a class ImageSettings
*/
export interface ImageSettingsModel {
/**
* Specifies whether to allowType based file select.
*
* @default ['.jpeg', '.jpg', '.png']
*/
allowedTypes?: string[];
/**
* Specifies whether insert image inline or break.
*
* @default 'inline'
*/
display?: string;
/**
* Specifies whether the inserted image is saved as blob or base64.
*
* @default 'Blob'
*/
saveFormat?: SaveFormat;
/**
* Specifies whether image width.
*
* @default 'auto'
*/
width?: string;
/**
* Specifies whether image height.
*
* @default 'auto'
*/
height?: string;
/**
* Specifies the URL of save action that will receive the upload files and save in the server.
*
* @default 'null'
*/
saveUrl?: string;
/**
* Specifies the path of the location to store the images and refer it to display the images.
*
* @default 'null'
*/
path?: string;
/**
* To enable resizing for image element.
*
* @default 'true'
*/
resize?: boolean;
/**
* Specifies the URL of remove action that receives the file information and handle the remove operation in server.
*
* @default 'null'
*/
removeUrl?: string;
/**
* Defines the minimum Width of the image.
*
* @default '0'
*/
minWidth?: string | number;
/**
* Defines the maximum Width of the image.
*
* @default null
*/
maxWidth?: string | number;
/**
* Defines the minimum Height of the image.
*
* @default '0'
*/
minHeight?: string | number;
/**
* Defines the maximum Height of the image.
*
* @default null
*/
maxHeight?: string | number;
/**
* image resizing should be done by percentage calculation.
*
* @default false
*/
resizeByPercent?: boolean;
}
/**
* Interface for a class FileManagerSettings
*/
export interface FileManagerSettingsModel {
/**
* Specifies the AJAX settings of the file manager.
* @default {
* getImageUrl: null;
* url: null;
* uploadUrl: null;
* downloadUrl: null;
* }
*/
ajaxSettings?: AjaxSettingsModel;
/**
* Enables or disables drag-and-drop of files.
*
* @default false
*/
allowDragAndDrop?: boolean;
/**
* Specifies the context menu settings of the file manager.
*
* @default {
* file: ['Open', '|', 'Cut', 'Copy', '|', 'Delete', 'Rename', '|', 'Details'],
* folder: ['Open', '|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Rename', '|', 'Details'],
* layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', 'Upload', '|', 'Details', '|', 'SelectAll'],
* visible: true
* }
*/
contextMenuSettings?: ContextMenuSettingsModel;
/**
* Specifies the root CSS class of the file manager that allows you to customize the appearance by overriding the styles.
*
* @default ''
*/
cssClass?: string;
/**
* Specifies the details view settings of the file manager.
*
* @default {
* columns: [{
* field: 'name', headerText: 'Name', minWidth: 120, template: '<span class="e-fe-text">${name}</span>',
* customAttributes: { class: 'e-fe-grid-name'}}, { field: '_fm_modified', headerText: 'DateModified', type: 'dateTime',
* format: 'MMMM dd, yyyy HH:mm', minWidth: 120, width: '190' }, { field: 'size', headerText: 'Size', minWidth: 90, width: '110',
* template: '<span class="e-fe-size">${size}</span>'
* }]
* }
*/
detailsViewSettings?: DetailsViewSettingsModel;
/**
* Specifies whether to enable the file manager in RichTextEditor.
*
* @default false
*/
enable?: boolean;
/**
* Specifies the navigation pane settings of the file manager.
*
* @default { maxWidth: '650px', minWidth: '240px', visible: true }
*/
navigationPaneSettings?: NavigationPaneSettingsModel;
/**
* Specifies the current path of the file manager.
*
* @default '/'
*/
path?: string;
/**
* Specifies the root folder alias name in file manager
*
* @default null
*/
rootAliasName?: string;
/**
* Specifies the search settings of the file manager.
*
* @default {
* allowSearchOnTyping: true,
* filterType: 'contains',
* ignoreCase: true
* }
*/
searchSettings?: SearchSettingsModel;
/**
* Shows or hides the file extension in file manager.
*
* @default true
*/
showFileExtension?: boolean;
/**
* Shows or hides the files and folders that are marked as hidden.
*
* @default false
*/
showHiddenItems?: boolean;
/**
* Shows or hides the thumbnail images in large icons view.
*
* @default true
*/
showThumbnail?: boolean;
/**
* Specifies a value that indicates whether the folders and files are sorted in the ascending or descending order,
* or they are not sorted at all. The available types of sort orders are,
* `None` - Indicates that the folders and files are not sorted.
* `Ascending` - Indicates that the folders and files are sorted in the ascending order.
* `Descending` - Indicates that the folders and files are sorted in the descending order.
*
* @default 'Ascending'
*/
sortOrder?: SortOrder;
/**
* Specifies the group of items aligned horizontally in the toolbar.
*
* @default { visible: true, items: ['NewFolder', 'Upload', 'Cut', 'Copy', 'Paste', 'Delete', 'Download', 'Rename', 'SortBy', 'Refresh', 'Selection', 'View', 'Details'] }
*/
toolbarSettings?: FileToolbarSettingsModel;
/**
* Specifies the upload settings for the file manager.
*
* @default { autoUpload: true, minFileSize: 0, maxFileSize: 30000000, allowedExtensions: '', autoClose: false }
*/
uploadSettings?: UploadSettingsModel;
/**
* Specifies the initial view of the file manager.
*
* With the help of this property, initial view can be changed to details or largeicons view. The available views are:
* * `LargeIcons`
* * `Details`
*
* @default 'LargeIcons'
*/
view?: ViewType;
}
/**
* Interface for a class TableSettings
*/
export interface TableSettingsModel {
/**
* To specify the width of table
*
* @default '100%'
*/
width?: string | number;
/**
* Class name should be appended by default in table element.
* It helps to design the table in specific CSS styles always when inserting in editor.
*
* @default TableStyleItems;
*/
styles?: IDropDownItemModel[];
/**
* To enable resizing for table element.
*
* @default 'true'
*/
resize?: boolean;
/**
* Defines the minimum Width of the table.
*
* @default '0'
*/
minWidth?: string | number;
/**
* Defines the maximum Width of the table.
*
* @default null
*/
maxWidth?: string | number;
}
/**
* Interface for a class QuickToolbarSettings
*/
export interface QuickToolbarSettingsModel {
/**
* Specifies whether to enable quick toolbar in RichTextEditor.
*
* @default true
*/
enable?: boolean;
/**
* Specifies whether to opens a quick toolbar on the right click.
*
* @default false
*/
showOnRightClick?: boolean;
/**
* Specifies the action that should happen when scroll the target-parent container.
*
* @default 'hide'
*/
actionOnScroll?: ActionOnScroll;
/**
* Specifies the items to render in quick toolbar, when link selected.
*
* @default ['Open', 'Edit', 'UnLink']
*/
link?: (string | IToolbarItems)[];
/**
* Specifies the items to render in quick toolbar, when image selected.
*
* @default ['Replace', 'Align', 'Caption', 'Remove', '-', 'InsertLink','OpenImageLink', 'EditImageLink', 'RemoveImageLink', 'Display', 'AltText', 'Dimension']
*/
image?: (string | IToolbarItems)[];
/**
* Specifies the items to render in quick toolbar, when text selected.
*
* @default ['Cut', 'Copy', 'Paste']
* @deprecated
*/
text?: (string | IToolbarItems)[];
/**
* Specifies the items to render in quick toolbar, when table selected.
*
* @default ['TableHeader', 'TableRows', 'TableColumns', 'BackgroundColor', '-', 'TableRemove', 'Alignments', 'TableCellVerticalAlign', 'Styles']
*/
table?: (string | IToolbarItems)[];
}
/**
* Interface for a class PasteCleanupSettings
*/
export interface PasteCleanupSettingsModel {
/**
* Specifies whether to enable the prompt for paste in RichTextEditor.
*
* @default false
*/
prompt?: boolean;
/**
* Specifies the attributes to restrict when pasting in RichTextEditor.
*
* @default null
*/
deniedAttrs?: string[];
/**
* Specifies the allowed style properties when pasting in RichTextEditor.
*
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
*/
allowedStyleProps?: string[];
/**
* Specifies the tags to restrict when pasting in RichTextEditor.
*
* @default null
*/
deniedTags?: string[];
/**
* Specifies whether to keep or remove the format when pasting in RichTextEditor.
*
* @default true
*/
keepFormat?: boolean;
/**
* Specifies whether to paste as plain text or not in RichTextEditor.
*
* @default false
*/
plainText?: boolean;
}
/**
* Interface for a class FontFamily
*/
export interface FontFamilyModel {
/**
* Specifies default font family selection
*
* @default 'null'
*/
default?: string;
/**
* Specifies content width
*
* @default '65px'
*/
width?: string;
/**
* Specifies default font family items
*
* @default fontFamily
*/
items?: IDropDownItemModel[];
}
/**
* Interface for a class FontSize
*/
export interface FontSizeModel {
/**
* Specifies default font size selection
*
* @default 'null'
*/
default?: string;
/**
* Specifies content width
*
* @default '35px'
*/
width?: string;
/**
* Specifies default font size items
*
* @default fontSize
*/
items?: IDropDownItemModel[];
}
/**
* Interface for a class Format
*/
export interface FormatModel {
/**
* Specifies default format
*
* @default 'null'
*/
default?: string;
/**
* Specifies content width
*
* @default '65px'
*/
width?: string;
/**
* Specifies default font size items
*
* @default formatItems
*/
types?: IDropDownItemModel[];
}
/**
* Interface for a class FontColor
*/
export interface FontColorModel {
/**
* Specifies default font color
*
* @default '#ff0000'
*/
default?: string;
/**
* Specifies mode
*
* @default 'Palette'
*/
mode?: ColorModeType;
/**
* Specifies columns
*
* @default 10
*/
columns?: number;
/**
* Specifies color code customization
*
* @default fontColor
*/
colorCode?: { [key: string]: string[] };
/**
* Specifies modeSwitcher button
*
* @default false
*/
modeSwitcher?: boolean;
}
/**
* Interface for a class BackgroundColor
*/
export interface BackgroundColorModel {
/**
* Specifies default font color
*
* @default '#ffff00'
*/
default?: string;
/**
* Specifies mode
*
* @default 'Palette'
*/
mode?: ColorModeType;
/**
* Specifies columns
*
* @default 10
*/
columns?: number;
/**
* Specifies color code customization
*
* @default backgroundColor
*/
colorCode?: { [key: string]: string[] };
/**
* Specifies a modeSwitcher button
*
* @default false
*/
modeSwitcher?: boolean;
}