tinymce-rails 5.8.2 → 5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/source/tinymce/tinymce.js +4383 -4446
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +40 -41
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/js/emojiimages.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/js/emojis.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/tinymce.d.ts +209 -136
- data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
- metadata +2 -2
@@ -16,8 +16,19 @@ interface IndexBookmark {
|
|
16
16
|
interface PathBookmark {
|
17
17
|
start: number[];
|
18
18
|
end?: number[];
|
19
|
+
isFakeCaret?: boolean;
|
19
20
|
}
|
20
21
|
declare type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
|
22
|
+
declare type NormalizedEvent<E, T = any> = E & {
|
23
|
+
readonly type: string;
|
24
|
+
readonly target: T;
|
25
|
+
readonly isDefaultPrevented: () => boolean;
|
26
|
+
readonly preventDefault: () => void;
|
27
|
+
readonly isPropagationStopped: () => boolean;
|
28
|
+
readonly stopPropagation: () => void;
|
29
|
+
readonly isImmediatePropagationStopped: () => boolean;
|
30
|
+
readonly stopImmediatePropagation: () => void;
|
31
|
+
};
|
21
32
|
declare type MappedEvent<T, K extends string> = K extends keyof T ? T[K] : any;
|
22
33
|
interface NativeEventMap {
|
23
34
|
'beforepaste': Event;
|
@@ -61,16 +72,7 @@ interface NativeEventMap {
|
|
61
72
|
'touchcancel': TouchEvent;
|
62
73
|
'wheel': WheelEvent;
|
63
74
|
}
|
64
|
-
declare type EditorEvent<T> = T
|
65
|
-
target: any;
|
66
|
-
type: string;
|
67
|
-
preventDefault: () => void;
|
68
|
-
isDefaultPrevented: () => boolean;
|
69
|
-
stopPropagation: () => void;
|
70
|
-
isPropagationStopped: () => boolean;
|
71
|
-
stopImmediatePropagation: () => void;
|
72
|
-
isImmediatePropagationStopped: () => boolean;
|
73
|
-
};
|
75
|
+
declare type EditorEvent<T> = NormalizedEvent<T>;
|
74
76
|
interface EventDispatcherSettings {
|
75
77
|
scope?: any;
|
76
78
|
toggleEvent?: (name: string, state: boolean) => void | boolean;
|
@@ -88,7 +90,7 @@ declare class EventDispatcher<T> {
|
|
88
90
|
private readonly toggleEvent;
|
89
91
|
private bindings;
|
90
92
|
constructor(settings?: Record<string, any>);
|
91
|
-
fire<K extends string, U extends MappedEvent<T, K>>(
|
93
|
+
fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
|
92
94
|
on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void), prepend?: boolean, extra?: {}): this;
|
93
95
|
off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
|
94
96
|
once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
|
@@ -120,29 +122,29 @@ interface UndoManager {
|
|
120
122
|
ignore: (callback: () => void) => void;
|
121
123
|
extra: (callback1: () => void, callback2: () => void) => void;
|
122
124
|
}
|
123
|
-
declare type ArrayCallback<T, R> = (x: T, i: number, xs: ReadonlyArray<T>) => R;
|
124
|
-
declare type ObjCallback<T, R> = (value: T, key: string, obj: Record<string, T>) => R;
|
125
|
-
declare type ArrayCallback
|
126
|
-
declare type ObjCallback
|
125
|
+
declare type ArrayCallback$1<T, R> = (x: T, i: number, xs: ReadonlyArray<T>) => R;
|
126
|
+
declare type ObjCallback$1<T, R> = (value: T, key: string, obj: Record<string, T>) => R;
|
127
|
+
declare type ArrayCallback<T, R> = ArrayCallback$1<T, R>;
|
128
|
+
declare type ObjCallback<T, R> = ObjCallback$1<T, R>;
|
127
129
|
interface Tools {
|
128
130
|
is: (obj: any, type: string) => boolean;
|
129
131
|
isArray: <T>(arr: any) => arr is Array<T>;
|
130
132
|
inArray: <T>(arr: ArrayLike<T>, value: T) => number;
|
131
133
|
grep: {
|
132
|
-
<T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback
|
133
|
-
<T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback
|
134
|
+
<T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback<T, boolean>): T[];
|
135
|
+
<T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback<T, boolean>): T[];
|
134
136
|
};
|
135
137
|
trim: (str: string) => string;
|
136
138
|
toArray: <T>(obj: ArrayLike<T>) => T[];
|
137
139
|
hasOwn: (obj: any, name: string) => boolean;
|
138
140
|
makeMap: <T>(items: ArrayLike<T> | string, delim?: string | RegExp, map?: Record<string, T | string>) => Record<string, T | string>;
|
139
141
|
each: {
|
140
|
-
<T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback
|
141
|
-
<T>(obj: Record<string, T> | null | undefined, cb: ObjCallback
|
142
|
+
<T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, void | boolean>, scope?: any): boolean;
|
143
|
+
<T>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, void | boolean>, scope?: any): boolean;
|
142
144
|
};
|
143
145
|
map: {
|
144
|
-
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback
|
145
|
-
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback
|
146
|
+
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
147
|
+
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
146
148
|
};
|
147
149
|
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
|
148
150
|
create: (name: string, p: Object, root?: Object) => void;
|
@@ -153,15 +155,8 @@ interface Tools {
|
|
153
155
|
_addCacheSuffix: (url: string) => string;
|
154
156
|
}
|
155
157
|
declare type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void;
|
156
|
-
declare type EventUtilsEvent<T> = T & {
|
157
|
-
|
158
|
-
target: any;
|
159
|
-
isDefaultPrevented: () => boolean;
|
160
|
-
preventDefault: () => void;
|
161
|
-
isPropagationStopped: () => boolean;
|
162
|
-
stopPropagation: () => void;
|
163
|
-
isImmediatePropagationStopped: () => boolean;
|
164
|
-
stopImmediatePropagation: () => void;
|
158
|
+
declare type EventUtilsEvent<T> = NormalizedEvent<T> & {
|
159
|
+
metaKey: boolean;
|
165
160
|
};
|
166
161
|
interface EventUtilsConstructor {
|
167
162
|
readonly prototype: EventUtils;
|
@@ -231,7 +226,7 @@ interface DomQueryConstructor {
|
|
231
226
|
grep<T>(array: T[], callback: (item: any, i: number) => boolean): T[];
|
232
227
|
unique<T>(results: T[]): T[];
|
233
228
|
text(elem: Node): string;
|
234
|
-
contains(context: any, elem: Node):
|
229
|
+
contains(context: any, elem: Node): boolean;
|
235
230
|
filter(expr: string, elems: Node[], not?: boolean): any;
|
236
231
|
}
|
237
232
|
interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
|
@@ -248,10 +243,10 @@ interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
|
|
248
243
|
attr(attrs: Record<string, string | boolean | number | null>): this;
|
249
244
|
attr(name: string): string;
|
250
245
|
before(content: DomQuerySelector<T>): this;
|
251
|
-
children(selector?: string): DomQuery<ChildNode>;
|
246
|
+
children(selector?: string): DomQuery<Node & ChildNode>;
|
252
247
|
clone(): this;
|
253
248
|
closest(selector: DomQuerySelector<T>): this;
|
254
|
-
contents(selector?: string): DomQuery<ChildNode>;
|
249
|
+
contents(selector?: string): DomQuery<Node & ChildNode>;
|
255
250
|
css(name: string, value: string | number | null): this;
|
256
251
|
css(styles: Record<string, string | number | null>): this;
|
257
252
|
css(name: string): string;
|
@@ -268,8 +263,8 @@ interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
|
|
268
263
|
html(): string;
|
269
264
|
is(selector: string | ((i: number, item: any) => boolean)): boolean;
|
270
265
|
last(): this;
|
271
|
-
next(selector?: string): DomQuery<ChildNode>;
|
272
|
-
nextUntil(selector: DomQuerySelector<T>, until?: string): DomQuery<ChildNode>;
|
266
|
+
next(selector?: string): DomQuery<Node & ChildNode>;
|
267
|
+
nextUntil(selector: DomQuerySelector<T>, until?: string): DomQuery<Node & ChildNode>;
|
273
268
|
off<K extends keyof HTMLElementEventMap>(name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
|
274
269
|
off<U>(name?: string, callback?: EventUtilsCallback<U>): this;
|
275
270
|
offset(offset?: {}): {} | this;
|
@@ -280,8 +275,8 @@ interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
|
|
280
275
|
parentsUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node>;
|
281
276
|
prepend(content: DomQuerySelector<T>): this;
|
282
277
|
prependTo(val: DomQuerySelector<T>): this;
|
283
|
-
prev(selector?: string): DomQuery<ChildNode>;
|
284
|
-
prevUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<ChildNode>;
|
278
|
+
prev(selector?: string): DomQuery<Node & ChildNode>;
|
279
|
+
prevUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node & ChildNode>;
|
285
280
|
prop(name: string, value: string): this;
|
286
281
|
prop(props: Record<string, string | number>): this;
|
287
282
|
prop(name: string): string;
|
@@ -369,17 +364,17 @@ interface SchemaRegExpMap {
|
|
369
364
|
[name: string]: RegExp;
|
370
365
|
}
|
371
366
|
interface Schema {
|
372
|
-
children: Record<string,
|
367
|
+
children: Record<string, SchemaMap>;
|
373
368
|
elements: Record<string, SchemaElement>;
|
374
|
-
getValidStyles: () =>
|
375
|
-
getValidClasses: () => SchemaMap;
|
369
|
+
getValidStyles: () => Record<string, string[]> | undefined;
|
370
|
+
getValidClasses: () => Record<string, SchemaMap> | undefined;
|
376
371
|
getBlockElements: () => SchemaMap;
|
377
|
-
getInvalidStyles: () => SchemaMap;
|
372
|
+
getInvalidStyles: () => Record<string, SchemaMap> | undefined;
|
378
373
|
getShortEndedElements: () => SchemaMap;
|
379
374
|
getTextBlockElements: () => SchemaMap;
|
380
375
|
getTextInlineElements: () => SchemaMap;
|
381
376
|
getBoolAttrs: () => SchemaMap;
|
382
|
-
getElementRule: (name: string) => SchemaElement;
|
377
|
+
getElementRule: (name: string) => SchemaElement | undefined;
|
383
378
|
getSelfClosingElements: () => SchemaMap;
|
384
379
|
getNonEmptyElements: () => SchemaMap;
|
385
380
|
getMoveCaretBeforeOnEnterElements: () => SchemaMap;
|
@@ -393,7 +388,7 @@ interface Schema {
|
|
393
388
|
addCustomElements: (customElements: string) => void;
|
394
389
|
addValidChildren: (validChildren: any) => void;
|
395
390
|
}
|
396
|
-
declare type Attributes = Array<{
|
391
|
+
declare type Attributes$1 = Array<{
|
397
392
|
name: string;
|
398
393
|
value: string;
|
399
394
|
}> & {
|
@@ -408,7 +403,7 @@ declare class AstNode {
|
|
408
403
|
static create(name: string, attrs?: Record<string, string>): AstNode;
|
409
404
|
name: string;
|
410
405
|
type: number;
|
411
|
-
attributes?: Attributes;
|
406
|
+
attributes?: Attributes$1;
|
412
407
|
value?: string;
|
413
408
|
shortEnded?: boolean;
|
414
409
|
parent?: AstNode;
|
@@ -416,11 +411,13 @@ declare class AstNode {
|
|
416
411
|
lastChild?: AstNode;
|
417
412
|
next?: AstNode;
|
418
413
|
prev?: AstNode;
|
414
|
+
raw?: boolean;
|
415
|
+
fixed?: boolean;
|
419
416
|
constructor(name: string, type: number);
|
420
417
|
replace(node: AstNode): AstNode;
|
421
|
-
attr(name: string, value: string | null): AstNode;
|
422
|
-
attr(name: Record<string, string | null>): AstNode;
|
423
|
-
attr(name: string): string;
|
418
|
+
attr(name: string, value: string | null): AstNode | undefined;
|
419
|
+
attr(name: Record<string, string | null>): AstNode | undefined;
|
420
|
+
attr(name: string): string | undefined;
|
424
421
|
clone(): AstNode;
|
425
422
|
wrap(wrapper: AstNode): AstNode;
|
426
423
|
unwrap(): void;
|
@@ -428,6 +425,7 @@ declare class AstNode {
|
|
428
425
|
append(node: AstNode): AstNode;
|
429
426
|
insert(node: AstNode, refNode: AstNode, before?: boolean): AstNode;
|
430
427
|
getAll(name: string): AstNode[];
|
428
|
+
children(): AstNode[];
|
431
429
|
empty(): AstNode;
|
432
430
|
isEmpty(elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean): boolean;
|
433
431
|
walk(prev?: boolean): AstNode;
|
@@ -447,16 +445,7 @@ interface SetContentArgs {
|
|
447
445
|
set?: boolean;
|
448
446
|
content?: string;
|
449
447
|
no_events?: boolean;
|
450
|
-
|
451
|
-
interface BlobCache {
|
452
|
-
create: (o: string | BlobInfoData, blob?: Blob, base64?: string, name?: string, filename?: string) => BlobInfo;
|
453
|
-
add: (blobInfo: BlobInfo) => void;
|
454
|
-
get: (id: string) => BlobInfo | undefined;
|
455
|
-
getByUri: (blobUri: string) => BlobInfo | undefined;
|
456
|
-
getByData: (base64: string, type: string) => BlobInfo | undefined;
|
457
|
-
findFirst: (predicate: (blobInfo: BlobInfo) => boolean) => BlobInfo | undefined;
|
458
|
-
removeByUri: (blobUri: string) => void;
|
459
|
-
destroy: () => void;
|
448
|
+
no_selection?: boolean;
|
460
449
|
}
|
461
450
|
interface BlobInfoData {
|
462
451
|
id?: string;
|
@@ -476,6 +465,16 @@ interface BlobInfo {
|
|
476
465
|
blobUri: () => string;
|
477
466
|
uri: () => string | undefined;
|
478
467
|
}
|
468
|
+
interface BlobCache {
|
469
|
+
create: (o: string | BlobInfoData, blob?: Blob, base64?: string, name?: string, filename?: string) => BlobInfo;
|
470
|
+
add: (blobInfo: BlobInfo) => void;
|
471
|
+
get: (id: string) => BlobInfo | undefined;
|
472
|
+
getByUri: (blobUri: string) => BlobInfo | undefined;
|
473
|
+
getByData: (base64: string, type: string) => BlobInfo | undefined;
|
474
|
+
findFirst: (predicate: (blobInfo: BlobInfo) => boolean) => BlobInfo | undefined;
|
475
|
+
removeByUri: (blobUri: string) => void;
|
476
|
+
destroy: () => void;
|
477
|
+
}
|
479
478
|
interface NotificationManagerImpl {
|
480
479
|
open: (spec: NotificationSpec, closeCallback?: () => void) => NotificationApi;
|
481
480
|
close: <T extends NotificationApi>(notification: T) => void;
|
@@ -510,7 +509,7 @@ interface UploadFailureOptions {
|
|
510
509
|
remove?: boolean;
|
511
510
|
}
|
512
511
|
declare type UploadHandler = (blobInfo: BlobInfo, success: (url: string) => void, failure: (err: string, options?: UploadFailureOptions) => void, progress?: (percent: number) => void) => void;
|
513
|
-
interface UploadResult {
|
512
|
+
interface UploadResult$2 {
|
514
513
|
url: string;
|
515
514
|
blobInfo: BlobInfo;
|
516
515
|
status: boolean;
|
@@ -530,58 +529,61 @@ declare type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelec
|
|
530
529
|
declare type Format = ApplyFormat | RemoveFormat;
|
531
530
|
declare type Formats = Record<string, Format | Format[]>;
|
532
531
|
declare type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string);
|
533
|
-
declare type FormatVars = Record<string, string>;
|
534
|
-
interface
|
532
|
+
declare type FormatVars = Record<string, string | null>;
|
533
|
+
interface BaseFormat<T> {
|
535
534
|
ceFalseOverride?: boolean;
|
536
535
|
classes?: string | string[];
|
537
536
|
collapsed?: boolean;
|
538
537
|
exact?: boolean;
|
539
538
|
expand?: boolean;
|
540
539
|
links?: boolean;
|
540
|
+
mixed?: boolean;
|
541
|
+
block_expand?: boolean;
|
541
542
|
onmatch?: (node: Node, fmt: T, itemName: string) => boolean;
|
542
|
-
|
543
|
+
remove?: 'none' | 'empty' | 'all';
|
543
544
|
remove_similar?: boolean;
|
545
|
+
split?: boolean;
|
546
|
+
deep?: boolean;
|
547
|
+
preserve_attributes?: string[];
|
548
|
+
}
|
549
|
+
interface Block {
|
550
|
+
block: string;
|
551
|
+
list_block?: string;
|
552
|
+
wrapper?: boolean;
|
553
|
+
}
|
554
|
+
interface Inline {
|
555
|
+
inline: string;
|
556
|
+
}
|
557
|
+
interface Selector {
|
558
|
+
selector: string;
|
559
|
+
inherit?: boolean;
|
544
560
|
}
|
545
|
-
interface
|
561
|
+
interface CommonFormat<T> extends BaseFormat<T> {
|
546
562
|
attributes?: Record<string, FormatAttrOrStyleValue>;
|
547
|
-
preview?: string | boolean;
|
548
563
|
styles?: Record<string, FormatAttrOrStyleValue>;
|
549
564
|
toggle?: boolean;
|
550
|
-
|
565
|
+
preview?: string | false;
|
566
|
+
onformat?: (elm: Node, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
|
567
|
+
clear_child_styles?: boolean;
|
551
568
|
merge_siblings?: boolean;
|
552
569
|
merge_with_parents?: boolean;
|
570
|
+
defaultBlock?: string;
|
553
571
|
}
|
554
|
-
interface BlockFormat extends
|
555
|
-
block: string;
|
556
|
-
block_expand?: boolean;
|
572
|
+
interface BlockFormat extends Block, CommonFormat<BlockFormat> {
|
557
573
|
}
|
558
|
-
interface InlineFormat extends
|
559
|
-
inline: string;
|
560
|
-
clear_child_styles?: boolean;
|
574
|
+
interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
|
561
575
|
}
|
562
|
-
interface SelectorFormat extends
|
563
|
-
selector: string;
|
564
|
-
defaultBlock?: string;
|
565
|
-
inherit?: boolean;
|
576
|
+
interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
|
566
577
|
}
|
567
|
-
interface CommonRemoveFormat<T> extends
|
568
|
-
remove?: 'none' | 'empty' | 'all';
|
578
|
+
interface CommonRemoveFormat<T> extends BaseFormat<T> {
|
569
579
|
attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
|
570
580
|
styles?: string[] | Record<string, FormatAttrOrStyleValue>;
|
571
|
-
split?: boolean;
|
572
|
-
deep?: boolean;
|
573
|
-
mixed?: boolean;
|
574
581
|
}
|
575
|
-
interface RemoveBlockFormat extends CommonRemoveFormat<RemoveBlockFormat> {
|
576
|
-
block: string;
|
577
|
-
list_block?: string;
|
582
|
+
interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
|
578
583
|
}
|
579
|
-
interface RemoveInlineFormat extends CommonRemoveFormat<RemoveInlineFormat> {
|
580
|
-
inline: string;
|
581
|
-
preserve_attributes?: string[];
|
584
|
+
interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
|
582
585
|
}
|
583
|
-
interface RemoveSelectorFormat extends CommonRemoveFormat<RemoveSelectorFormat> {
|
584
|
-
selector: string;
|
586
|
+
interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
|
585
587
|
}
|
586
588
|
type Format_d_Formats = Formats;
|
587
589
|
type Format_d_Format = Format;
|
@@ -927,7 +929,7 @@ interface SeparatorMenuItemSpec {
|
|
927
929
|
type?: 'separator';
|
928
930
|
text?: string;
|
929
931
|
}
|
930
|
-
declare type ColumnTypes = number | 'auto';
|
932
|
+
declare type ColumnTypes$1 = number | 'auto';
|
931
933
|
declare type SeparatorItemSpec = SeparatorMenuItemSpec;
|
932
934
|
interface AutocompleterItemSpec {
|
933
935
|
type?: 'autocompleteitem';
|
@@ -941,10 +943,10 @@ interface AutocompleterSpec {
|
|
941
943
|
type?: 'autocompleter';
|
942
944
|
ch: string;
|
943
945
|
minChars?: number;
|
944
|
-
columns?: ColumnTypes;
|
946
|
+
columns?: ColumnTypes$1;
|
945
947
|
matches?: (rng: Range, text: string, pattern: string) => boolean;
|
946
948
|
fetch: (pattern: string, maxResults: number, fetchOptions: Record<string, any>) => Promise<AutocompleterContents[]>;
|
947
|
-
onAction: (autocompleterApi: AutocompleterInstanceApi, rng:
|
949
|
+
onAction: (autocompleterApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
|
948
950
|
maxResults?: number;
|
949
951
|
highlightOn?: string[];
|
950
952
|
}
|
@@ -1048,11 +1050,33 @@ declare type ContextMenuContents = string | ContextMenuItem | SeparatorMenuItemS
|
|
1048
1050
|
interface ContextMenuApi {
|
1049
1051
|
update: (element: Element) => string | Array<ContextMenuContents>;
|
1050
1052
|
}
|
1051
|
-
interface
|
1053
|
+
interface FancyActionArgsMap {
|
1054
|
+
'inserttable': {
|
1055
|
+
numRows: number;
|
1056
|
+
numColumns: number;
|
1057
|
+
};
|
1058
|
+
'colorswatch': {
|
1059
|
+
value: string;
|
1060
|
+
};
|
1061
|
+
}
|
1062
|
+
interface BaseFancyMenuItemSpec<T extends keyof FancyActionArgsMap> {
|
1052
1063
|
type: 'fancymenuitem';
|
1053
|
-
fancytype:
|
1054
|
-
|
1064
|
+
fancytype: T;
|
1065
|
+
initData?: Record<string, unknown>;
|
1066
|
+
onAction?: (data: FancyActionArgsMap[T]) => void;
|
1067
|
+
}
|
1068
|
+
interface InsertTableMenuItemSpec extends BaseFancyMenuItemSpec<'inserttable'> {
|
1069
|
+
fancytype: 'inserttable';
|
1070
|
+
initData?: {};
|
1071
|
+
}
|
1072
|
+
interface ColorSwatchMenuItemSpec extends BaseFancyMenuItemSpec<'colorswatch'> {
|
1073
|
+
fancytype: 'colorswatch';
|
1074
|
+
initData?: {
|
1075
|
+
allowCustomColors?: boolean;
|
1076
|
+
colors: ChoiceMenuItemSpec[];
|
1077
|
+
};
|
1055
1078
|
}
|
1079
|
+
declare type FancyMenuItemSpec = InsertTableMenuItemSpec | ColorSwatchMenuItemSpec;
|
1056
1080
|
interface MenuItemSpec extends CommonMenuItemSpec {
|
1057
1081
|
type?: 'menuitem';
|
1058
1082
|
icon?: string;
|
@@ -1151,6 +1175,8 @@ type PublicMenu_d_NestedMenuItemContents = NestedMenuItemContents;
|
|
1151
1175
|
type PublicMenu_d_NestedMenuItemSpec = NestedMenuItemSpec;
|
1152
1176
|
type PublicMenu_d_NestedMenuItemInstanceApi = NestedMenuItemInstanceApi;
|
1153
1177
|
type PublicMenu_d_FancyMenuItemSpec = FancyMenuItemSpec;
|
1178
|
+
type PublicMenu_d_ColorSwatchMenuItemSpec = ColorSwatchMenuItemSpec;
|
1179
|
+
type PublicMenu_d_InsertTableMenuItemSpec = InsertTableMenuItemSpec;
|
1154
1180
|
type PublicMenu_d_ToggleMenuItemSpec = ToggleMenuItemSpec;
|
1155
1181
|
type PublicMenu_d_ToggleMenuItemInstanceApi = ToggleMenuItemInstanceApi;
|
1156
1182
|
type PublicMenu_d_ChoiceMenuItemSpec = ChoiceMenuItemSpec;
|
@@ -1167,7 +1193,7 @@ type PublicMenu_d_CardContainerSpec = CardContainerSpec;
|
|
1167
1193
|
type PublicMenu_d_CardImageSpec = CardImageSpec;
|
1168
1194
|
type PublicMenu_d_CardTextSpec = CardTextSpec;
|
1169
1195
|
declare namespace PublicMenu_d {
|
1170
|
-
export { PublicMenu_d_MenuItemSpec as MenuItemSpec, PublicMenu_d_MenuItemInstanceApi as MenuItemInstanceApi, PublicMenu_d_NestedMenuItemContents as NestedMenuItemContents, PublicMenu_d_NestedMenuItemSpec as NestedMenuItemSpec, PublicMenu_d_NestedMenuItemInstanceApi as NestedMenuItemInstanceApi, PublicMenu_d_FancyMenuItemSpec as FancyMenuItemSpec, PublicMenu_d_ToggleMenuItemSpec as ToggleMenuItemSpec, PublicMenu_d_ToggleMenuItemInstanceApi as ToggleMenuItemInstanceApi, PublicMenu_d_ChoiceMenuItemSpec as ChoiceMenuItemSpec, PublicMenu_d_ChoiceMenuItemInstanceApi as ChoiceMenuItemInstanceApi, PublicMenu_d_SeparatorMenuItemSpec as SeparatorMenuItemSpec, PublicMenu_d_ContextMenuApi as ContextMenuApi, PublicMenu_d_ContextMenuContents as ContextMenuContents, PublicMenu_d_ContextMenuItem as ContextMenuItem, PublicMenu_d_ContextSubMenu as ContextSubMenu, PublicMenu_d_CardMenuItemSpec as CardMenuItemSpec, PublicMenu_d_CardMenuItemInstanceApi as CardMenuItemInstanceApi, PublicMenu_d_CardItemSpec as CardItemSpec, PublicMenu_d_CardContainerSpec as CardContainerSpec, PublicMenu_d_CardImageSpec as CardImageSpec, PublicMenu_d_CardTextSpec as CardTextSpec, };
|
1196
|
+
export { PublicMenu_d_MenuItemSpec as MenuItemSpec, PublicMenu_d_MenuItemInstanceApi as MenuItemInstanceApi, PublicMenu_d_NestedMenuItemContents as NestedMenuItemContents, PublicMenu_d_NestedMenuItemSpec as NestedMenuItemSpec, PublicMenu_d_NestedMenuItemInstanceApi as NestedMenuItemInstanceApi, PublicMenu_d_FancyMenuItemSpec as FancyMenuItemSpec, PublicMenu_d_ColorSwatchMenuItemSpec as ColorSwatchMenuItemSpec, PublicMenu_d_InsertTableMenuItemSpec as InsertTableMenuItemSpec, PublicMenu_d_ToggleMenuItemSpec as ToggleMenuItemSpec, PublicMenu_d_ToggleMenuItemInstanceApi as ToggleMenuItemInstanceApi, PublicMenu_d_ChoiceMenuItemSpec as ChoiceMenuItemSpec, PublicMenu_d_ChoiceMenuItemInstanceApi as ChoiceMenuItemInstanceApi, PublicMenu_d_SeparatorMenuItemSpec as SeparatorMenuItemSpec, PublicMenu_d_ContextMenuApi as ContextMenuApi, PublicMenu_d_ContextMenuContents as ContextMenuContents, PublicMenu_d_ContextMenuItem as ContextMenuItem, PublicMenu_d_ContextSubMenu as ContextSubMenu, PublicMenu_d_CardMenuItemSpec as CardMenuItemSpec, PublicMenu_d_CardMenuItemInstanceApi as CardMenuItemInstanceApi, PublicMenu_d_CardItemSpec as CardItemSpec, PublicMenu_d_CardContainerSpec as CardContainerSpec, PublicMenu_d_CardImageSpec as CardImageSpec, PublicMenu_d_CardTextSpec as CardTextSpec, };
|
1171
1197
|
}
|
1172
1198
|
interface SidebarInstanceApi {
|
1173
1199
|
element: () => HTMLElement;
|
@@ -1196,12 +1222,12 @@ interface GroupToolbarButtonSpec extends BaseToolbarButtonSpec<GroupToolbarButto
|
|
1196
1222
|
items?: ToolbarConfig;
|
1197
1223
|
}
|
1198
1224
|
declare type MenuButtonItemTypes = NestedMenuItemContents;
|
1199
|
-
declare type SuccessCallback = (menu: string | MenuButtonItemTypes[]) => void;
|
1225
|
+
declare type SuccessCallback$1 = (menu: string | MenuButtonItemTypes[]) => void;
|
1200
1226
|
interface BaseMenuButtonSpec {
|
1201
1227
|
text?: string;
|
1202
1228
|
tooltip?: string;
|
1203
1229
|
icon?: string;
|
1204
|
-
fetch: (success: SuccessCallback) => void;
|
1230
|
+
fetch: (success: SuccessCallback$1) => void;
|
1205
1231
|
onSetup?: (api: BaseMenuButtonInstanceApi) => (api: BaseMenuButtonInstanceApi) => void;
|
1206
1232
|
}
|
1207
1233
|
interface BaseMenuButtonInstanceApi {
|
@@ -1217,10 +1243,10 @@ interface ToolbarMenuButtonSpec extends BaseMenuButtonSpec {
|
|
1217
1243
|
interface ToolbarMenuButtonInstanceApi extends BaseMenuButtonInstanceApi {
|
1218
1244
|
}
|
1219
1245
|
declare type ToolbarSplitButtonItemTypes = ChoiceMenuItemSpec | SeparatorMenuItemSpec;
|
1220
|
-
declare type SuccessCallback
|
1246
|
+
declare type SuccessCallback = (menu: ToolbarSplitButtonItemTypes[]) => void;
|
1221
1247
|
declare type SelectPredicate = (value: string) => boolean;
|
1222
1248
|
declare type PresetTypes = 'color' | 'normal' | 'listpreview';
|
1223
|
-
declare type ColumnTypes
|
1249
|
+
declare type ColumnTypes = number | 'auto';
|
1224
1250
|
interface ToolbarSplitButtonSpec {
|
1225
1251
|
type?: 'splitbutton';
|
1226
1252
|
tooltip?: string;
|
@@ -1228,8 +1254,8 @@ interface ToolbarSplitButtonSpec {
|
|
1228
1254
|
text?: string;
|
1229
1255
|
select?: SelectPredicate;
|
1230
1256
|
presets?: PresetTypes;
|
1231
|
-
columns?: ColumnTypes
|
1232
|
-
fetch: (success: SuccessCallback
|
1257
|
+
columns?: ColumnTypes;
|
1258
|
+
fetch: (success: SuccessCallback) => void;
|
1233
1259
|
onSetup?: (api: ToolbarSplitButtonInstanceApi) => (api: ToolbarSplitButtonInstanceApi) => void;
|
1234
1260
|
onAction: (api: ToolbarSplitButtonInstanceApi) => void;
|
1235
1261
|
onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
|
@@ -1255,7 +1281,7 @@ type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceA
|
|
1255
1281
|
declare namespace PublicToolbar_d {
|
1256
1282
|
export { PublicToolbar_d_ToolbarButtonSpec as ToolbarButtonSpec, PublicToolbar_d_ToolbarButtonInstanceApi as ToolbarButtonInstanceApi, PublicToolbar_d_ToolbarSplitButtonSpec as ToolbarSplitButtonSpec, PublicToolbar_d_ToolbarSplitButtonInstanceApi as ToolbarSplitButtonInstanceApi, PublicToolbar_d_ToolbarMenuButtonSpec as ToolbarMenuButtonSpec, PublicToolbar_d_ToolbarMenuButtonInstanceApi as ToolbarMenuButtonInstanceApi, PublicToolbar_d_ToolbarToggleButtonSpec as ToolbarToggleButtonSpec, PublicToolbar_d_ToolbarToggleButtonInstanceApi as ToolbarToggleButtonInstanceApi, PublicToolbar_d_GroupToolbarButtonSpec as GroupToolbarButtonSpec, PublicToolbar_d_GroupToolbarButtonInstanceApi as GroupToolbarButtonInstanceApi, };
|
1257
1283
|
}
|
1258
|
-
interface Registry {
|
1284
|
+
interface Registry$1 {
|
1259
1285
|
addButton: (name: string, spec: ToolbarButtonSpec) => void;
|
1260
1286
|
addGroupToolbarButton: (name: string, spec: GroupToolbarButtonSpec) => void;
|
1261
1287
|
addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
|
@@ -1280,6 +1306,11 @@ interface Registry {
|
|
1280
1306
|
sidebars: Record<string, SidebarSpec>;
|
1281
1307
|
};
|
1282
1308
|
}
|
1309
|
+
interface StyleSheetLoaderSettings {
|
1310
|
+
maxLoadTime?: number;
|
1311
|
+
contentCssCors?: boolean;
|
1312
|
+
referrerPolicy?: ReferrerPolicy;
|
1313
|
+
}
|
1283
1314
|
interface StyleSheetLoader {
|
1284
1315
|
load: (url: string, success: () => void, failure?: () => void) => void;
|
1285
1316
|
loadAll: (urls: string[], success: (urls: string[]) => void, failure: (urls: string[]) => void) => void;
|
@@ -1287,12 +1318,7 @@ interface StyleSheetLoader {
|
|
1287
1318
|
unloadAll: (urls: string[]) => void;
|
1288
1319
|
_setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
|
1289
1320
|
}
|
1290
|
-
|
1291
|
-
maxLoadTime?: number;
|
1292
|
-
contentCssCors?: boolean;
|
1293
|
-
referrerPolicy?: ReferrerPolicy;
|
1294
|
-
}
|
1295
|
-
declare type Registry$1 = Registry;
|
1321
|
+
declare type Registry = Registry$1;
|
1296
1322
|
interface EditorUiApi {
|
1297
1323
|
show: () => void;
|
1298
1324
|
hide: () => void;
|
@@ -1301,15 +1327,21 @@ interface EditorUiApi {
|
|
1301
1327
|
isDisabled: () => boolean;
|
1302
1328
|
}
|
1303
1329
|
interface EditorUi extends EditorUiApi {
|
1304
|
-
registry: Registry
|
1330
|
+
registry: Registry;
|
1305
1331
|
styleSheetLoader: StyleSheetLoader;
|
1306
1332
|
}
|
1333
|
+
type Ui_d_Registry = Registry;
|
1307
1334
|
type Ui_d_EditorUiApi = EditorUiApi;
|
1308
1335
|
type Ui_d_EditorUi = EditorUi;
|
1309
1336
|
declare namespace Ui_d {
|
1310
|
-
export {
|
1337
|
+
export { Ui_d_Registry as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, };
|
1311
1338
|
}
|
1312
1339
|
declare type EntityEncoding = 'named' | 'numeric' | 'raw' | 'named,numeric' | 'named+numeric' | 'numeric,named' | 'numeric+named';
|
1340
|
+
interface ContentLanguage {
|
1341
|
+
readonly title: string;
|
1342
|
+
readonly code: string;
|
1343
|
+
readonly customCode?: string;
|
1344
|
+
}
|
1313
1345
|
declare type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
|
1314
1346
|
editorContainer: HTMLElement;
|
1315
1347
|
iframeContainer: HTMLElement;
|
@@ -1363,7 +1395,9 @@ interface BaseEditorSettings {
|
|
1363
1395
|
content_css_cors?: boolean;
|
1364
1396
|
content_security_policy?: string;
|
1365
1397
|
content_style?: string;
|
1398
|
+
deprecation_warnings?: boolean;
|
1366
1399
|
font_css?: string | string[];
|
1400
|
+
content_langs?: ContentLanguage[];
|
1367
1401
|
contextmenu?: string | false;
|
1368
1402
|
contextmenu_never_use_native?: boolean;
|
1369
1403
|
convert_fonts_to_spans?: boolean;
|
@@ -1404,6 +1438,7 @@ interface BaseEditorSettings {
|
|
1404
1438
|
icons?: string;
|
1405
1439
|
icons_url?: string;
|
1406
1440
|
id?: string;
|
1441
|
+
iframe_aria_text?: string;
|
1407
1442
|
images_dataimg_filter?: (imgElm: HTMLImageElement) => boolean;
|
1408
1443
|
images_file_types?: string;
|
1409
1444
|
images_replace_blob_uris?: boolean;
|
@@ -1423,7 +1458,7 @@ interface BaseEditorSettings {
|
|
1423
1458
|
inline_boundaries_selector?: string;
|
1424
1459
|
inline_styles?: boolean;
|
1425
1460
|
invalid_elements?: string;
|
1426
|
-
invalid_styles?: string
|
1461
|
+
invalid_styles?: string | Record<string, string>;
|
1427
1462
|
keep_styles?: boolean;
|
1428
1463
|
language?: string;
|
1429
1464
|
language_load?: boolean;
|
@@ -1441,6 +1476,7 @@ interface BaseEditorSettings {
|
|
1441
1476
|
no_newline_selector?: string;
|
1442
1477
|
nowrap?: boolean;
|
1443
1478
|
object_resizing?: boolean | string;
|
1479
|
+
padd_empty_with_br?: boolean;
|
1444
1480
|
placeholder?: string;
|
1445
1481
|
preserve_cdata?: boolean;
|
1446
1482
|
preview_styles?: boolean | string;
|
@@ -1487,6 +1523,7 @@ interface BaseEditorSettings {
|
|
1487
1523
|
valid_classes?: string | Record<string, string>;
|
1488
1524
|
valid_elements?: string;
|
1489
1525
|
valid_styles?: string | Record<string, string>;
|
1526
|
+
verify_html?: boolean;
|
1490
1527
|
visual?: boolean;
|
1491
1528
|
visual_anchor_class?: string;
|
1492
1529
|
visual_table_class?: string;
|
@@ -1507,6 +1544,7 @@ interface BaseEditorSettings {
|
|
1507
1544
|
text_block_elements?: string;
|
1508
1545
|
text_inline_elements?: string;
|
1509
1546
|
whitespace_elements?: string;
|
1547
|
+
special?: string;
|
1510
1548
|
disable_nodechange?: boolean;
|
1511
1549
|
forced_plugins?: string | string[];
|
1512
1550
|
plugin_base_urls?: Record<string, string>;
|
@@ -1586,7 +1624,7 @@ interface Rect {
|
|
1586
1624
|
intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
|
1587
1625
|
clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
|
1588
1626
|
create: (x: number, y: number, w: number, h: number) => GeomRect;
|
1589
|
-
fromClientRect: (clientRect:
|
1627
|
+
fromClientRect: (clientRect: DOMRect) => GeomRect;
|
1590
1628
|
}
|
1591
1629
|
interface StyleMap {
|
1592
1630
|
[s: string]: string | number;
|
@@ -1748,6 +1786,14 @@ interface DOMUtils {
|
|
1748
1786
|
isChildOf: (node: Node, parent: Node) => boolean;
|
1749
1787
|
dumpRng: (r: Range) => string;
|
1750
1788
|
}
|
1789
|
+
interface ClientRect {
|
1790
|
+
left: number;
|
1791
|
+
top: number;
|
1792
|
+
bottom: number;
|
1793
|
+
right: number;
|
1794
|
+
width: number;
|
1795
|
+
height: number;
|
1796
|
+
}
|
1751
1797
|
interface GetSelectionContentArgs extends GetContentArgs {
|
1752
1798
|
selection?: boolean;
|
1753
1799
|
contextual?: boolean;
|
@@ -1772,6 +1818,8 @@ interface ParserArgs {
|
|
1772
1818
|
context?: string;
|
1773
1819
|
isRootContent?: boolean;
|
1774
1820
|
format?: string;
|
1821
|
+
invalid?: boolean;
|
1822
|
+
no_events?: boolean;
|
1775
1823
|
[key: string]: any;
|
1776
1824
|
}
|
1777
1825
|
declare type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
|
@@ -1798,6 +1846,7 @@ interface DomParserSettings {
|
|
1798
1846
|
validate?: boolean;
|
1799
1847
|
inline_styles?: boolean;
|
1800
1848
|
blob_cache?: BlobCache;
|
1849
|
+
document?: Document;
|
1801
1850
|
images_dataimg_filter?: (img: HTMLImageElement) => boolean;
|
1802
1851
|
}
|
1803
1852
|
interface DomParser {
|
@@ -1817,7 +1866,7 @@ interface WriterSettings {
|
|
1817
1866
|
indent_after?: string;
|
1818
1867
|
indent_before?: string;
|
1819
1868
|
}
|
1820
|
-
declare type Attributes
|
1869
|
+
declare type Attributes = Array<{
|
1821
1870
|
name: string;
|
1822
1871
|
value: string;
|
1823
1872
|
}>;
|
@@ -1829,7 +1878,7 @@ interface Writer {
|
|
1829
1878
|
getContent: () => string;
|
1830
1879
|
pi: (name: string, text?: string) => void;
|
1831
1880
|
reset: () => void;
|
1832
|
-
start: (name: string, attrs?: Attributes
|
1881
|
+
start: (name: string, attrs?: Attributes, empty?: boolean) => void;
|
1833
1882
|
text: (text: string, raw?: boolean) => void;
|
1834
1883
|
}
|
1835
1884
|
interface HtmlSerializerSettings extends WriterSettings {
|
@@ -1839,9 +1888,6 @@ interface HtmlSerializerSettings extends WriterSettings {
|
|
1839
1888
|
interface HtmlSerializer {
|
1840
1889
|
serialize: (node: AstNode) => string;
|
1841
1890
|
}
|
1842
|
-
interface DomSerializerArgs extends ParserArgs {
|
1843
|
-
format?: string;
|
1844
|
-
}
|
1845
1891
|
interface DomSerializerSettings extends DomParserSettings, WriterSettings, SchemaSettings, HtmlSerializerSettings {
|
1846
1892
|
url_converter?: URLConverter;
|
1847
1893
|
url_converter_scope?: {};
|
@@ -1855,8 +1901,8 @@ interface DomSerializerImpl {
|
|
1855
1901
|
serialize: {
|
1856
1902
|
(node: Element, parserArgs: {
|
1857
1903
|
format: 'tree';
|
1858
|
-
} &
|
1859
|
-
(node: Element, parserArgs?:
|
1904
|
+
} & ParserArgs): AstNode;
|
1905
|
+
(node: Element, parserArgs?: ParserArgs): string;
|
1860
1906
|
};
|
1861
1907
|
addRules: (rules: string) => void;
|
1862
1908
|
setRules: (rules: string) => void;
|
@@ -1911,9 +1957,9 @@ interface EditorSelection {
|
|
1911
1957
|
unbind: () => void;
|
1912
1958
|
};
|
1913
1959
|
getScrollContainer: () => HTMLElement;
|
1914
|
-
scrollIntoView: (elm
|
1960
|
+
scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
|
1915
1961
|
placeCaretAt: (clientX: number, clientY: number) => void;
|
1916
|
-
getBoundingClientRect: () => ClientRect;
|
1962
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
1917
1963
|
destroy: () => void;
|
1918
1964
|
}
|
1919
1965
|
declare type EditorCommandCallback = (ui: boolean, value: any, args: any) => void;
|
@@ -1953,13 +1999,6 @@ interface WindowParams {
|
|
1953
1999
|
readonly inline?: 'cursor' | 'toolbar';
|
1954
2000
|
readonly ariaAttrs?: boolean;
|
1955
2001
|
}
|
1956
|
-
interface WindowManager {
|
1957
|
-
open: <T>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
|
1958
|
-
openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
|
1959
|
-
alert: (message: string, callback?: () => void, scope?: any) => void;
|
1960
|
-
confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
|
1961
|
-
close: () => void;
|
1962
|
-
}
|
1963
2002
|
declare type InstanceApi<T> = UrlDialogInstanceApi | DialogInstanceApi<T>;
|
1964
2003
|
interface WindowManagerImpl {
|
1965
2004
|
open: <T>(config: DialogSpec<T>, params: WindowParams, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
|
@@ -1968,6 +2007,13 @@ interface WindowManagerImpl {
|
|
1968
2007
|
confirm: (message: string, callback: (state: boolean) => void) => void;
|
1969
2008
|
close: (dialog: InstanceApi<any>) => void;
|
1970
2009
|
}
|
2010
|
+
interface WindowManager {
|
2011
|
+
open: <T>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
|
2012
|
+
openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
|
2013
|
+
alert: (message: string, callback?: () => void, scope?: any) => void;
|
2014
|
+
confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
|
2015
|
+
close: () => void;
|
2016
|
+
}
|
1971
2017
|
interface ExecCommandEvent {
|
1972
2018
|
command: string;
|
1973
2019
|
ui?: boolean;
|
@@ -1979,6 +2025,7 @@ declare type GetContentEvent = GetContentArgs & {
|
|
1979
2025
|
save?: boolean;
|
1980
2026
|
};
|
1981
2027
|
declare type SetContentEvent = SetContentArgs & {
|
2028
|
+
source_view?: boolean;
|
1982
2029
|
paste?: boolean;
|
1983
2030
|
selection?: boolean;
|
1984
2031
|
};
|
@@ -1991,6 +2038,11 @@ interface NodeChangeEvent {
|
|
1991
2038
|
selectionChange?: boolean;
|
1992
2039
|
initial?: boolean;
|
1993
2040
|
}
|
2041
|
+
interface FormatEvent {
|
2042
|
+
format: string;
|
2043
|
+
vars?: FormatVars;
|
2044
|
+
node?: Node | RangeLikeObject;
|
2045
|
+
}
|
1994
2046
|
interface ObjectResizeEvent {
|
1995
2047
|
target: HTMLElement;
|
1996
2048
|
width: number;
|
@@ -2041,6 +2093,12 @@ interface PlaceholderToggleEvent {
|
|
2041
2093
|
interface LoadErrorEvent {
|
2042
2094
|
message: string;
|
2043
2095
|
}
|
2096
|
+
interface PreProcessEvent extends ParserArgs {
|
2097
|
+
node: Element;
|
2098
|
+
}
|
2099
|
+
interface PostProcessEvent extends ParserArgs {
|
2100
|
+
content: string;
|
2101
|
+
}
|
2044
2102
|
interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
|
2045
2103
|
'activate': {
|
2046
2104
|
relatedTarget: Editor;
|
@@ -2074,6 +2132,8 @@ interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
|
|
2074
2132
|
'BeforeExecCommand': ExecCommandEvent;
|
2075
2133
|
'ExecCommand': ExecCommandEvent;
|
2076
2134
|
'NodeChange': NodeChangeEvent;
|
2135
|
+
'FormatApply': FormatEvent;
|
2136
|
+
'FormatRemove': FormatEvent;
|
2077
2137
|
'ShowCaret': ShowCaretEvent;
|
2078
2138
|
'SelectionChange': {};
|
2079
2139
|
'ObjectSelected': ObjectSelectedEvent;
|
@@ -2108,6 +2168,8 @@ interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
|
|
2108
2168
|
'tap': TouchEvent;
|
2109
2169
|
'longpress': TouchEvent;
|
2110
2170
|
'longpresscancel': {};
|
2171
|
+
'PreProcess': PreProcessEvent;
|
2172
|
+
'PostProcess': PostProcessEvent;
|
2111
2173
|
}
|
2112
2174
|
interface EditorManagerEventMap {
|
2113
2175
|
'AddEditor': {
|
@@ -2125,6 +2187,7 @@ type EventTypes_d_GetContentEvent = GetContentEvent;
|
|
2125
2187
|
type EventTypes_d_SetContentEvent = SetContentEvent;
|
2126
2188
|
type EventTypes_d_NewBlockEvent = NewBlockEvent;
|
2127
2189
|
type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
|
2190
|
+
type EventTypes_d_FormatEvent = FormatEvent;
|
2128
2191
|
type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
|
2129
2192
|
type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
|
2130
2193
|
type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
|
@@ -2138,10 +2201,12 @@ type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
|
|
2138
2201
|
type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
|
2139
2202
|
type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
|
2140
2203
|
type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
|
2204
|
+
type EventTypes_d_PreProcessEvent = PreProcessEvent;
|
2205
|
+
type EventTypes_d_PostProcessEvent = PostProcessEvent;
|
2141
2206
|
type EventTypes_d_EditorEventMap = EditorEventMap;
|
2142
2207
|
type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
|
2143
2208
|
declare namespace EventTypes_d {
|
2144
|
-
export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
|
2209
|
+
export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_FormatEvent as FormatEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_PreProcessEvent as PreProcessEvent, EventTypes_d_PostProcessEvent as PostProcessEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
|
2145
2210
|
}
|
2146
2211
|
interface RawString {
|
2147
2212
|
raw: string;
|
@@ -2186,11 +2251,17 @@ interface URIConstructor {
|
|
2186
2251
|
data: string;
|
2187
2252
|
};
|
2188
2253
|
}
|
2254
|
+
interface SafeUriOptions {
|
2255
|
+
readonly allow_html_data_urls?: boolean;
|
2256
|
+
readonly allow_script_urls?: boolean;
|
2257
|
+
readonly allow_svg_data_urls?: boolean;
|
2258
|
+
}
|
2189
2259
|
declare class URI {
|
2190
2260
|
static parseDataUri(uri: string): {
|
2191
2261
|
type: string;
|
2192
2262
|
data: string;
|
2193
2263
|
};
|
2264
|
+
static isDomSafe(uri: string, context?: string, options?: SafeUriOptions): boolean;
|
2194
2265
|
static getDocumentBaseUrl(loc: {
|
2195
2266
|
protocol: string;
|
2196
2267
|
host?: string;
|
@@ -2279,7 +2350,7 @@ declare type FormatChangeCallback = (state: boolean, data: {
|
|
2279
2350
|
}) => void;
|
2280
2351
|
interface FormatRegistry {
|
2281
2352
|
get: {
|
2282
|
-
(name: string): Format[];
|
2353
|
+
(name: string): Format[] | undefined;
|
2283
2354
|
(): Record<string, Format[]>;
|
2284
2355
|
};
|
2285
2356
|
has: (name: string) => boolean;
|
@@ -2290,12 +2361,12 @@ interface Formatter extends FormatRegistry {
|
|
2290
2361
|
apply: (name: string, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
|
2291
2362
|
remove: (name: string, vars?: FormatVars, node?: Node | Range, similar?: boolean) => void;
|
2292
2363
|
toggle: (name: string, vars?: FormatVars, node?: Node) => void;
|
2293
|
-
match: (name: string, vars?: FormatVars, node?: Node) => boolean;
|
2294
|
-
closest: (names:
|
2364
|
+
match: (name: string, vars?: FormatVars, node?: Node, similar?: boolean) => boolean;
|
2365
|
+
closest: (names: string[]) => string | null;
|
2295
2366
|
matchAll: (names: string[], vars?: FormatVars) => string[];
|
2296
|
-
matchNode: (node: Node, name: string, vars?: FormatVars, similar?: boolean) =>
|
2367
|
+
matchNode: (node: Node, name: string, vars?: FormatVars, similar?: boolean) => Format | undefined;
|
2297
2368
|
canApply: (name: string) => boolean;
|
2298
|
-
formatChanged: (names: string, callback: FormatChangeCallback, similar?: boolean) => {
|
2369
|
+
formatChanged: (names: string, callback: FormatChangeCallback, similar?: boolean, vars?: FormatVars) => {
|
2299
2370
|
unbind: () => void;
|
2300
2371
|
};
|
2301
2372
|
getCssText: (format: string | Format) => string;
|
@@ -2667,6 +2738,7 @@ interface SaxParserSettings {
|
|
2667
2738
|
remove_internals?: boolean;
|
2668
2739
|
self_closing_elements?: Record<string, {}>;
|
2669
2740
|
validate?: boolean;
|
2741
|
+
document?: Document;
|
2670
2742
|
cdata?: (text: string) => void;
|
2671
2743
|
comment?: (text: string) => void;
|
2672
2744
|
doctype?: (text: string) => void;
|
@@ -2719,13 +2791,13 @@ interface HSV {
|
|
2719
2791
|
s: number;
|
2720
2792
|
v: number;
|
2721
2793
|
}
|
2794
|
+
declare type ColorConstructor = new (value?: string | RGB | HSV) => Color;
|
2722
2795
|
interface Color {
|
2723
2796
|
toRgb: () => RGB;
|
2724
2797
|
toHsv: () => HSV;
|
2725
2798
|
toHex: () => string;
|
2726
2799
|
parse: (value: string | RGB | HSV) => Color;
|
2727
2800
|
}
|
2728
|
-
declare type ColorConstructor = new (value?: string | RGB | HSV) => Color;
|
2729
2801
|
interface DebounceFunc<T extends (...args: any[]) => void> {
|
2730
2802
|
(...args: Parameters<T>): void;
|
2731
2803
|
stop: () => void;
|
@@ -2741,9 +2813,9 @@ interface Delay {
|
|
2741
2813
|
debounce: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
|
2742
2814
|
throttle: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
|
2743
2815
|
}
|
2744
|
-
declare type UploadResult
|
2816
|
+
declare type UploadResult = UploadResult$2;
|
2745
2817
|
interface ImageUploader {
|
2746
|
-
upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult
|
2818
|
+
upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult[]>;
|
2747
2819
|
}
|
2748
2820
|
interface JSONUtils {
|
2749
2821
|
serialize: (obj: any) => string;
|
@@ -2800,6 +2872,7 @@ interface VK {
|
|
2800
2872
|
DELETE: number;
|
2801
2873
|
DOWN: number;
|
2802
2874
|
ENTER: number;
|
2875
|
+
ESC: number;
|
2803
2876
|
LEFT: number;
|
2804
2877
|
RIGHT: number;
|
2805
2878
|
SPACEBAR: number;
|