tinymce-rails 5.10.2 → 6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -18
  3. data/Rakefile +1 -2
  4. data/app/assets/javascripts/tinymce/rails.js +1 -1
  5. data/app/assets/source/tinymce/tinymce.js +18631 -19280
  6. data/lib/tinymce/rails/asset_installer/compile.rb +2 -2
  7. data/lib/tinymce/rails/asset_installer.rb +1 -1
  8. data/lib/tinymce/rails/asset_manifest.rb +1 -1
  9. data/lib/tinymce/rails/configuration.rb +6 -1
  10. data/lib/tinymce/rails/configuration_file.rb +4 -3
  11. data/lib/tinymce/rails/version.rb +2 -2
  12. data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/license.txt +21 -504
  14. data/vendor/assets/javascripts/tinymce/models/dom/model.js +4 -0
  15. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +2 -7
  16. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +2 -7
  17. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +2 -7
  18. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +2 -7
  19. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +2 -7
  20. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +2 -7
  21. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +2 -7
  22. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +2 -7
  23. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +2 -7
  24. data/vendor/assets/javascripts/tinymce/plugins/emoticons/js/emojiimages.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/emoticons/js/emojis.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +2 -7
  27. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +2 -7
  28. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +2 -7
  29. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -7
  30. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +2 -7
  31. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +2 -7
  32. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +2 -7
  33. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +2 -7
  34. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +2 -7
  35. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +2 -7
  36. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +2 -7
  37. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +2 -7
  38. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +2 -7
  39. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +2 -7
  40. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +2 -7
  41. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -7
  42. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +2 -7
  43. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +2 -7
  44. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +2 -7
  45. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +2 -7
  46. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.css +1 -7
  47. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.min.css +1 -7
  48. data/vendor/assets/javascripts/tinymce/skins/content/default/content.css +0 -6
  49. data/vendor/assets/javascripts/tinymce/skins/content/default/content.min.css +0 -6
  50. data/vendor/assets/javascripts/tinymce/skins/content/document/content.css +0 -6
  51. data/vendor/assets/javascripts/tinymce/skins/content/document/content.min.css +0 -6
  52. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5/content.css +1 -0
  53. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5/content.min.css +1 -0
  54. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5-dark/content.css +1 -0
  55. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5-dark/content.min.css +1 -0
  56. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.css +0 -6
  57. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.min.css +0 -6
  58. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -7
  59. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -7
  60. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -7
  61. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -7
  62. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -7
  63. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -7
  64. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.css +1 -7
  65. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  66. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -7
  67. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -7
  68. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -7
  69. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -7
  70. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -7
  71. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -7
  72. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +1 -7
  73. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  74. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.css +1 -0
  75. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.css +1 -0
  76. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -0
  77. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.min.css +1 -0
  78. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -0
  79. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
  80. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +1 -0
  81. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  82. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.css +1 -0
  83. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -0
  84. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  85. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -0
  86. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -0
  87. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  88. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +1 -0
  89. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  90. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -7
  91. data/vendor/assets/javascripts/tinymce/tinymce.d.ts +998 -1139
  92. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -7
  93. metadata +23 -30
  94. data/app/assets/javascripts/tinymce-jquery.js +0 -2
  95. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +0 -91
  96. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +0 -9
  97. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +0 -9
  98. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +0 -9
  99. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +0 -9
  100. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +0 -9
  101. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +0 -9
  102. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +0 -9
  103. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +0 -9
  104. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +0 -9
  105. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +0 -9
  106. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +0 -9
  107. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +0 -9
  108. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +0 -9
  109. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +0 -9
  110. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +0 -9
  111. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.mobile.css +0 -7
  112. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.mobile.min.css +0 -7
  113. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  114. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.mobile.css +0 -7
  115. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -7
  116. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -7
  117. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -7
  118. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  119. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -7
  120. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
  121. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +0 -9
@@ -1,13 +1,16 @@
1
1
  interface StringPathBookmark {
2
2
  start: string;
3
3
  end?: string;
4
+ forward?: boolean;
4
5
  }
5
6
  interface RangeBookmark {
6
7
  rng: Range;
8
+ forward?: boolean;
7
9
  }
8
10
  interface IdBookmark {
9
11
  id: string;
10
12
  keep?: boolean;
13
+ forward?: boolean;
11
14
  }
12
15
  interface IndexBookmark {
13
16
  name: string;
@@ -17,6 +20,7 @@ interface PathBookmark {
17
20
  start: number[];
18
21
  end?: number[];
19
22
  isFakeCaret?: boolean;
23
+ forward?: boolean;
20
24
  }
21
25
  declare type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
22
26
  declare type NormalizedEvent<E, T = any> = E & {
@@ -91,6 +95,7 @@ declare class EventDispatcher<T> {
91
95
  private bindings;
92
96
  constructor(settings?: Record<string, any>);
93
97
  fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
98
+ dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
94
99
  on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void), prepend?: boolean, extra?: {}): this;
95
100
  off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
96
101
  once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
@@ -111,6 +116,7 @@ interface UndoManager {
111
116
  data: UndoLevel[];
112
117
  typing: boolean;
113
118
  add: (level?: UndoLevel, event?: EditorEvent<any>) => UndoLevel;
119
+ dispatchChange: () => void;
114
120
  beforeChange: () => void;
115
121
  undo: () => UndoLevel;
116
122
  redo: () => UndoLevel;
@@ -122,213 +128,25 @@ interface UndoManager {
122
128
  ignore: (callback: () => void) => void;
123
129
  extra: (callback1: () => void, callback2: () => void) => void;
124
130
  }
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>;
129
- interface Tools {
130
- is: (obj: any, type: string) => boolean;
131
- isArray: <T>(arr: any) => arr is Array<T>;
132
- inArray: <T>(arr: ArrayLike<T>, value: T) => number;
133
- grep: {
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[];
136
- };
137
- trim: (str: string) => string;
138
- toArray: <T>(obj: ArrayLike<T>) => T[];
139
- hasOwn: (obj: any, name: string) => boolean;
140
- makeMap: <T>(items: ArrayLike<T> | string, delim?: string | RegExp, map?: Record<string, T | string>) => Record<string, T | string>;
141
- each: {
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;
144
- };
145
- map: {
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[];
148
- };
149
- extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
150
- create: (name: string, p: Object, root?: Object) => void;
151
- walk: <T = any>(obj: T, f: Function, n?: keyof T, scope?: any) => void;
152
- createNS: (name: string, o?: Object) => any;
153
- resolve: (path: string, o?: Object) => any;
154
- explode: (s: string, d?: string | RegExp) => string[];
155
- _addCacheSuffix: (url: string) => string;
156
- }
157
- declare type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void;
158
- declare type EventUtilsEvent<T> = NormalizedEvent<T> & {
159
- metaKey: boolean;
160
- };
161
- interface EventUtilsConstructor {
162
- readonly prototype: EventUtils;
163
- new (): EventUtils;
164
- Event: EventUtils;
165
- }
166
- declare class EventUtils {
167
- static Event: EventUtils;
168
- domLoaded: boolean;
169
- events: Record<string, any>;
170
- private readonly expando;
171
- private hasFocusIn;
172
- private hasMouseEnterLeave;
173
- private mouseEnterLeave;
174
- private count;
175
- constructor();
176
- bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
177
- bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
178
- unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
179
- unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
180
- unbind(target: any): this;
181
- fire(target: any, name: string, args?: {}): this;
182
- clean(target: any): this;
183
- destroy(): void;
184
- cancel<T = any>(e: EventUtilsEvent<T>): boolean;
185
- private executeHandlers;
186
- }
187
- declare type DomQuerySelector<T extends Node> = string | T | T[] | DomQuery<T>;
188
- declare type DomQueryInitSelector<T extends Node> = DomQuerySelector<T> | Window;
189
- interface Hook {
190
- get: <T extends Node>(elm: T) => string;
191
- set: <T extends Node>($elm: DomQuery<T>, value: string | null) => void;
192
- }
193
- interface DomQueryConstructor {
194
- readonly prototype: DomQuery;
195
- attrHooks: Record<string, Hook>;
196
- cssHooks: Record<string, Hook>;
197
- fn: DomQuery;
198
- find: any;
199
- expr: {
200
- cacheLength: number;
201
- createPseudo: Function;
202
- match: Record<string, RegExp>;
203
- attrHandle: {};
204
- find: Record<string, Function>;
205
- relative: Record<string, {
206
- dir: string;
207
- first?: boolean;
208
- }>;
209
- preFilter: Record<string, Function>;
210
- filter: Record<string, Function>;
211
- pseudos: Record<string, Function>;
212
- };
213
- extend: Tools['extend'];
214
- isArray: Tools['isArray'];
215
- new <T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
216
- <T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
217
- overrideDefaults(callback: () => {
218
- context: Node;
219
- element: Element;
220
- }): DomQueryConstructor;
221
- makeArray<T>(object: T): T[];
222
- inArray<T>(item: {}, array: T[]): number;
223
- each<T>(obj: T[], callback: (i: number, value: T) => void): void;
224
- each<T>(obj: T, callback: (key: string, obj: T[keyof T]) => void): void;
225
- trim(str: string): string;
226
- grep<T>(array: T[], callback: (item: any, i: number) => boolean): T[];
227
- unique<T>(results: T[]): T[];
228
- text(elem: Node): string;
229
- contains(context: any, elem: Node): boolean;
230
- filter(expr: string, elems: Node[], not?: boolean): any;
231
- }
232
- interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
233
- init: (selector?: DomQueryInitSelector<T>, context?: Node) => void;
234
- context: T;
235
- length: number;
236
- selector: string;
237
- add(items: Array<string | T> | DomQuery<T>, sort?: boolean): this;
238
- addClass(className: string): this;
239
- after(content: DomQuerySelector<T>): this;
240
- append(content: DomQuerySelector<T>): this;
241
- appendTo(val: DomQuerySelector<T>): this;
242
- attr(name: string, value: string | boolean | number | null): this;
243
- attr(attrs: Record<string, string | boolean | number | null>): this;
244
- attr(name: string): string;
245
- before(content: DomQuerySelector<T>): this;
246
- children(selector?: string): DomQuery<Node & ChildNode>;
247
- clone(): this;
248
- closest(selector: DomQuerySelector<T>): this;
249
- contents(selector?: string): DomQuery<Node & ChildNode>;
250
- css(name: string, value: string | number | null): this;
251
- css(styles: Record<string, string | number | null>): this;
252
- css(name: string): string;
253
- each(callback: (i: number, value: T) => void): this;
254
- empty(): this;
255
- eq(index: number): this;
256
- filter(selector: string | ((i: number, item: any) => boolean)): this;
257
- find<K extends keyof HTMLElementTagNameMap>(selector: K): DomQuery<HTMLElementTagNameMap[K]>;
258
- find<T extends Node>(selector: string): DomQuery<T>;
259
- first(): this;
260
- hasClass(className: string): boolean;
261
- hide(): this;
262
- html(value: string): this;
263
- html(): string;
264
- is(selector: string | ((i: number, item: any) => boolean)): boolean;
265
- last(): this;
266
- next(selector?: string): DomQuery<Node & ChildNode>;
267
- nextUntil(selector: DomQuerySelector<T>, until?: string): DomQuery<Node & ChildNode>;
268
- off<K extends keyof HTMLElementEventMap>(name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
269
- off<U>(name?: string, callback?: EventUtilsCallback<U>): this;
270
- offset(offset?: {}): {} | this;
271
- on<K extends keyof HTMLElementEventMap>(name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>): this;
272
- on<U>(name: string, callback: EventUtilsCallback<U>): this;
273
- parent(selector?: string): DomQuery<Node>;
274
- parents(selector?: string): DomQuery<Node>;
275
- parentsUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node>;
276
- prepend(content: DomQuerySelector<T>): this;
277
- prependTo(val: DomQuerySelector<T>): this;
278
- prev(selector?: string): DomQuery<Node & ChildNode>;
279
- prevUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node & ChildNode>;
280
- prop(name: string, value: string): this;
281
- prop(props: Record<string, string | number>): this;
282
- prop(name: string): string;
283
- push(...items: T[]): number;
284
- remove(): this;
285
- removeAttr(name: string): this;
286
- removeClass(className: string): this;
287
- replaceWith(content: DomQuerySelector<T>): this;
288
- show(): this;
289
- slice(start: number, end?: number): this;
290
- splice(start: number, deleteCount?: number): T[];
291
- sort(compareFn?: (a: T, b: T) => number): T[];
292
- text(value: string): DomQuery;
293
- text(): string;
294
- toArray(): T[];
295
- toggleClass(className: string, state?: boolean): this;
296
- trigger(name: string | {
297
- type: string;
298
- }): this;
299
- unwrap(): this;
300
- wrap(content: DomQuerySelector<T>): this;
301
- wrapAll(content: DomQuerySelector<T>): this;
302
- wrapInner(content: string): this;
303
- }
304
131
  declare type SchemaType = 'html4' | 'html5' | 'html5-strict';
305
132
  interface SchemaSettings {
306
- block_elements?: string;
307
- boolean_attributes?: string;
308
133
  custom_elements?: string;
309
134
  extended_valid_elements?: string;
310
135
  invalid_elements?: string;
311
136
  invalid_styles?: string | Record<string, string>;
312
- move_caret_before_on_enter_elements?: string;
313
- non_empty_elements?: string;
314
137
  schema?: SchemaType;
315
- self_closing_elements?: string;
316
- short_ended_elements?: string;
317
- special?: string;
318
- text_block_elements?: string;
319
- text_inline_elements?: string;
320
138
  valid_children?: string;
321
139
  valid_classes?: string | Record<string, string>;
322
140
  valid_elements?: string;
323
141
  valid_styles?: string | Record<string, string>;
324
142
  verify_html?: boolean;
325
- whitespace_elements?: string;
143
+ padd_empty_block_inline_children?: boolean;
326
144
  }
327
145
  interface Attribute {
328
146
  required?: boolean;
329
147
  defaultValue?: string;
330
148
  forcedValue?: string;
331
- validValues?: any;
149
+ validValues?: Record<string, {}>;
332
150
  }
333
151
  interface DefaultAttribute {
334
152
  name: string;
@@ -339,7 +157,7 @@ interface AttributePattern {
339
157
  forcedValue?: string;
340
158
  pattern: RegExp;
341
159
  required?: boolean;
342
- validValues?: Record<string, string>;
160
+ validValues?: Record<string, {}>;
343
161
  }
344
162
  interface ElementRule {
345
163
  attributes: Record<string, Attribute>;
@@ -351,6 +169,7 @@ interface ElementRule {
351
169
  paddEmpty?: boolean;
352
170
  removeEmpty?: boolean;
353
171
  removeEmptyAttrs?: boolean;
172
+ paddInEmptyBlock?: boolean;
354
173
  }
355
174
  interface SchemaElement extends ElementRule {
356
175
  outputName?: string;
@@ -364,13 +183,14 @@ interface SchemaRegExpMap {
364
183
  [name: string]: RegExp;
365
184
  }
366
185
  interface Schema {
186
+ type: SchemaType;
367
187
  children: Record<string, SchemaMap>;
368
188
  elements: Record<string, SchemaElement>;
369
189
  getValidStyles: () => Record<string, string[]> | undefined;
370
190
  getValidClasses: () => Record<string, SchemaMap> | undefined;
371
191
  getBlockElements: () => SchemaMap;
372
192
  getInvalidStyles: () => Record<string, SchemaMap> | undefined;
373
- getShortEndedElements: () => SchemaMap;
193
+ getVoidElements: () => SchemaMap;
374
194
  getTextBlockElements: () => SchemaMap;
375
195
  getTextInlineElements: () => SchemaMap;
376
196
  getBoolAttrs: () => SchemaMap;
@@ -378,7 +198,7 @@ interface Schema {
378
198
  getSelfClosingElements: () => SchemaMap;
379
199
  getNonEmptyElements: () => SchemaMap;
380
200
  getMoveCaretBeforeOnEnterElements: () => SchemaMap;
381
- getWhiteSpaceElements: () => SchemaMap;
201
+ getWhitespaceElements: () => SchemaMap;
382
202
  getSpecialElements: () => SchemaRegExpMap;
383
203
  isValidChild: (name: string, child: string) => boolean;
384
204
  isValid: (name: string, attr?: string) => boolean;
@@ -405,14 +225,12 @@ declare class AstNode {
405
225
  type: number;
406
226
  attributes?: Attributes$1;
407
227
  value?: string;
408
- shortEnded?: boolean;
409
228
  parent?: AstNode;
410
229
  firstChild?: AstNode;
411
230
  lastChild?: AstNode;
412
231
  next?: AstNode;
413
232
  prev?: AstNode;
414
233
  raw?: boolean;
415
- fixed?: boolean;
416
234
  constructor(name: string, type: number);
417
235
  replace(node: AstNode): AstNode;
418
236
  attr(name: string, value: string | null): AstNode | undefined;
@@ -433,19 +251,29 @@ declare class AstNode {
433
251
  declare type Content = string | AstNode;
434
252
  declare type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
435
253
  interface GetContentArgs {
436
- format?: ContentFormat;
437
- get?: boolean;
438
- content?: string;
439
- getInner?: boolean;
254
+ format: ContentFormat;
255
+ get: boolean;
256
+ getInner: boolean;
440
257
  no_events?: boolean;
258
+ save?: boolean;
259
+ source_view?: boolean;
441
260
  [key: string]: any;
442
261
  }
443
262
  interface SetContentArgs {
444
- format?: string;
445
- set?: boolean;
446
- content?: string;
263
+ format: string;
264
+ set: boolean;
265
+ content: Content;
447
266
  no_events?: boolean;
448
267
  no_selection?: boolean;
268
+ paste?: boolean;
269
+ }
270
+ interface GetSelectionContentArgs extends GetContentArgs {
271
+ selection?: boolean;
272
+ contextual?: boolean;
273
+ }
274
+ interface SetSelectionContentArgs extends SetContentArgs {
275
+ content: string;
276
+ selection?: boolean;
449
277
  }
450
278
  interface BlobInfoData {
451
279
  id?: string;
@@ -466,7 +294,10 @@ interface BlobInfo {
466
294
  uri: () => string | undefined;
467
295
  }
468
296
  interface BlobCache {
469
- create: (o: string | BlobInfoData, blob?: Blob, base64?: string, name?: string, filename?: string) => BlobInfo;
297
+ create: {
298
+ (o: BlobInfoData): BlobInfo;
299
+ (id: string, blob: Blob, base64: string, name?: string, filename?: string): BlobInfo;
300
+ };
470
301
  add: (blobInfo: BlobInfo) => void;
471
302
  get: (id: string) => BlobInfo | undefined;
472
303
  getByUri: (blobUri: string) => BlobInfo | undefined;
@@ -475,10 +306,67 @@ interface BlobCache {
475
306
  removeByUri: (blobUri: string) => void;
476
307
  destroy: () => void;
477
308
  }
309
+ interface BlobInfoImagePair {
310
+ image: HTMLImageElement;
311
+ blobInfo: BlobInfo;
312
+ }
313
+ declare class NodeChange {
314
+ private readonly editor;
315
+ private lastPath;
316
+ constructor(editor: Editor);
317
+ nodeChanged(args?: any): void;
318
+ private isSameElementPath;
319
+ }
320
+ interface SelectionOverrides {
321
+ showCaret: (direction: number, node: Element, before: boolean, scrollIntoView?: boolean) => Range | null;
322
+ showBlockCaretContainer: (blockCaretContainer: Element) => void;
323
+ hideFakeCaret: () => void;
324
+ destroy: () => void;
325
+ }
326
+ interface Quirks {
327
+ refreshContentEditable(): void;
328
+ isHidden(): boolean;
329
+ }
330
+ declare type DecoratorData = Record<string, any>;
331
+ declare type Decorator = (uid: string, data: DecoratorData) => {
332
+ attributes?: {};
333
+ classes?: string[];
334
+ };
335
+ declare type AnnotationListener = (state: boolean, name: string, data?: {
336
+ uid: string;
337
+ nodes: any[];
338
+ }) => void;
339
+ declare type AnnotationListenerApi = AnnotationListener;
340
+ interface AnnotatorSettings {
341
+ decorate: Decorator;
342
+ persistent?: boolean;
343
+ }
344
+ interface Annotator {
345
+ register: (name: string, settings: AnnotatorSettings) => void;
346
+ annotate: (name: string, data: DecoratorData) => void;
347
+ annotationChanged: (name: string, f: AnnotationListenerApi) => void;
348
+ remove: (name: string) => void;
349
+ removeAll: (name: string) => void;
350
+ getAll: (name: string) => Record<string, Element[]>;
351
+ }
352
+ interface GeomRect {
353
+ readonly x: number;
354
+ readonly y: number;
355
+ readonly w: number;
356
+ readonly h: number;
357
+ }
358
+ interface Rect {
359
+ inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
360
+ relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
361
+ findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
362
+ intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
363
+ clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
364
+ create: (x: number, y: number, w: number, h: number) => GeomRect;
365
+ fromClientRect: (clientRect: DOMRect) => GeomRect;
366
+ }
478
367
  interface NotificationManagerImpl {
479
368
  open: (spec: NotificationSpec, closeCallback?: () => void) => NotificationApi;
480
369
  close: <T extends NotificationApi>(notification: T) => void;
481
- reposition: <T extends NotificationApi>(notifications: T[]) => void;
482
370
  getArgs: <T extends NotificationApi>(notification: T) => NotificationSpec;
483
371
  }
484
372
  interface NotificationSpec {
@@ -495,8 +383,7 @@ interface NotificationApi {
495
383
  value: (percent: number) => void;
496
384
  };
497
385
  text: (text: string) => void;
498
- moveTo: (x: number, y: number) => void;
499
- moveRel: (element: Element, rel: 'tc-tc' | 'bc-bc' | 'bc-tc' | 'tc-bc' | 'banner') => void;
386
+ reposition: () => void;
500
387
  getEl: () => HTMLElement;
501
388
  settings: NotificationSpec;
502
389
  }
@@ -505,124 +392,54 @@ interface NotificationManager {
505
392
  close: () => void;
506
393
  getNotifications: () => NotificationApi[];
507
394
  }
508
- interface UploadFailureOptions {
395
+ interface UploadFailure {
396
+ message: string;
509
397
  remove?: boolean;
510
398
  }
511
- declare type UploadHandler = (blobInfo: BlobInfo, success: (url: string) => void, failure: (err: string, options?: UploadFailureOptions) => void, progress?: (percent: number) => void) => void;
399
+ declare type ProgressFn = (percent: number) => void;
400
+ declare type UploadHandler = (blobInfo: BlobInfo, progress: ProgressFn) => Promise<string>;
512
401
  interface UploadResult$2 {
513
402
  url: string;
514
403
  blobInfo: BlobInfo;
515
404
  status: boolean;
516
- error?: {
517
- options: UploadFailureOptions;
518
- message: string;
519
- };
520
- }
521
- interface RangeLikeObject {
522
- startContainer: Node;
523
- startOffset: number;
524
- endContainer: Node;
525
- endOffset: number;
526
- }
527
- declare type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
528
- declare type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
529
- declare type Format = ApplyFormat | RemoveFormat;
530
- declare type Formats = Record<string, Format | Format[]>;
531
- declare type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string);
532
- declare type FormatVars = Record<string, string | null>;
533
- interface BaseFormat<T> {
534
- ceFalseOverride?: boolean;
535
- classes?: string | string[];
536
- collapsed?: boolean;
537
- exact?: boolean;
538
- expand?: boolean;
539
- links?: boolean;
540
- mixed?: boolean;
541
- block_expand?: boolean;
542
- onmatch?: (node: Node, fmt: T, itemName: string) => boolean;
543
- remove?: 'none' | 'empty' | 'all';
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;
560
- }
561
- interface CommonFormat<T> extends BaseFormat<T> {
562
- attributes?: Record<string, FormatAttrOrStyleValue>;
563
- styles?: Record<string, FormatAttrOrStyleValue>;
564
- toggle?: boolean;
565
- preview?: string | false;
566
- onformat?: (elm: Node, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
567
- clear_child_styles?: boolean;
568
- merge_siblings?: boolean;
569
- merge_with_parents?: boolean;
570
- defaultBlock?: string;
571
- }
572
- interface BlockFormat extends Block, CommonFormat<BlockFormat> {
573
- }
574
- interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
405
+ error?: UploadFailure;
575
406
  }
576
- interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
577
- }
578
- interface CommonRemoveFormat<T> extends BaseFormat<T> {
579
- attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
580
- styles?: string[] | Record<string, FormatAttrOrStyleValue>;
581
- }
582
- interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
583
- }
584
- interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
585
- }
586
- interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
587
- }
588
- type Format_d_Formats = Formats;
589
- type Format_d_Format = Format;
590
- type Format_d_ApplyFormat = ApplyFormat;
591
- type Format_d_BlockFormat = BlockFormat;
592
- type Format_d_InlineFormat = InlineFormat;
593
- type Format_d_SelectorFormat = SelectorFormat;
594
- type Format_d_RemoveFormat = RemoveFormat;
595
- type Format_d_RemoveBlockFormat = RemoveBlockFormat;
596
- type Format_d_RemoveInlineFormat = RemoveInlineFormat;
597
- type Format_d_RemoveSelectorFormat = RemoveSelectorFormat;
598
- declare namespace Format_d {
599
- export { Format_d_Formats as Formats, Format_d_Format as Format, Format_d_ApplyFormat as ApplyFormat, Format_d_BlockFormat as BlockFormat, Format_d_InlineFormat as InlineFormat, Format_d_SelectorFormat as SelectorFormat, Format_d_RemoveFormat as RemoveFormat, Format_d_RemoveBlockFormat as RemoveBlockFormat, Format_d_RemoveInlineFormat as RemoveInlineFormat, Format_d_RemoveSelectorFormat as RemoveSelectorFormat, };
600
- }
601
- declare type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
602
- declare type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
603
- interface Separator {
604
- title: string;
407
+ interface RawPattern {
408
+ start?: any;
409
+ end?: any;
410
+ format?: any;
411
+ cmd?: any;
412
+ value?: any;
413
+ replacement?: any;
605
414
  }
606
- interface FormatReference {
607
- title: string;
608
- format: string;
609
- icon?: string;
415
+ interface InlineBasePattern {
416
+ readonly start: string;
417
+ readonly end: string;
610
418
  }
611
- interface NestedFormatting {
612
- title: string;
613
- items: Array<FormatReference | StyleFormat>;
419
+ interface InlineFormatPattern extends InlineBasePattern {
420
+ readonly type: 'inline-format';
421
+ readonly format: string[];
614
422
  }
615
- interface CommonStyleFormat {
616
- name?: string;
617
- title: string;
618
- icon?: string;
423
+ interface InlineCmdPattern extends InlineBasePattern {
424
+ readonly type: 'inline-command';
425
+ readonly cmd: string;
426
+ readonly value?: any;
619
427
  }
620
- interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
428
+ declare type InlinePattern = InlineFormatPattern | InlineCmdPattern;
429
+ interface BlockBasePattern {
430
+ readonly start: string;
621
431
  }
622
- interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
432
+ interface BlockFormatPattern extends BlockBasePattern {
433
+ readonly type: 'block-format';
434
+ readonly format: string;
623
435
  }
624
- interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
436
+ interface BlockCmdPattern extends BlockBasePattern {
437
+ readonly type: 'block-command';
438
+ readonly cmd: string;
439
+ readonly value?: any;
625
440
  }
441
+ declare type BlockPattern = BlockFormatPattern | BlockCmdPattern;
442
+ declare type Pattern = InlinePattern | BlockPattern;
626
443
  interface AlertBannerSpec {
627
444
  type: 'alertbanner';
628
445
  level: 'info' | 'warn' | 'error' | 'success';
@@ -633,17 +450,12 @@ interface AlertBannerSpec {
633
450
  interface ButtonSpec {
634
451
  type: 'button';
635
452
  text: string;
636
- disabled?: boolean;
453
+ enabled?: boolean;
637
454
  primary?: boolean;
638
455
  name?: string;
639
456
  icon?: string;
640
457
  borderless?: boolean;
641
- }
642
- interface CheckboxSpec {
643
- name: string;
644
- type: 'checkbox';
645
- label: string;
646
- disabled?: boolean;
458
+ buttonType?: 'primary' | 'secondary' | 'toolbar';
647
459
  }
648
460
  interface FormComponentSpec {
649
461
  type: string;
@@ -652,9 +464,19 @@ interface FormComponentSpec {
652
464
  interface FormComponentWithLabelSpec extends FormComponentSpec {
653
465
  label?: string;
654
466
  }
467
+ interface CheckboxSpec extends FormComponentSpec {
468
+ type: 'checkbox';
469
+ label: string;
470
+ enabled?: boolean;
471
+ }
655
472
  interface CollectionSpec extends FormComponentWithLabelSpec {
656
473
  type: 'collection';
657
474
  }
475
+ interface CollectionItem {
476
+ value: string;
477
+ text: string;
478
+ icon: string;
479
+ }
658
480
  interface ColorInputSpec extends FormComponentWithLabelSpec {
659
481
  type: 'colorinput';
660
482
  }
@@ -696,21 +518,18 @@ interface HtmlPanelSpec {
696
518
  interface IframeSpec extends FormComponentWithLabelSpec {
697
519
  type: 'iframe';
698
520
  sandboxed?: boolean;
521
+ transparent?: boolean;
699
522
  }
700
- interface ImageToolsState {
701
- blob: Blob;
702
- url: string;
703
- }
704
- interface ImageToolsSpec extends FormComponentWithLabelSpec {
705
- type: 'imagetools';
706
- currentState: ImageToolsState;
523
+ interface ImagePreviewSpec extends FormComponentSpec {
524
+ type: 'imagepreview';
525
+ height?: string;
707
526
  }
708
527
  interface InputSpec extends FormComponentWithLabelSpec {
709
528
  type: 'input';
710
529
  inputMode?: string;
711
530
  placeholder?: string;
712
531
  maximized?: boolean;
713
- disabled?: boolean;
532
+ enabled?: boolean;
714
533
  }
715
534
  interface LabelSpec {
716
535
  type: 'label';
@@ -744,14 +563,20 @@ interface SelectBoxSpec extends FormComponentWithLabelSpec {
744
563
  type: 'selectbox';
745
564
  items: SelectBoxItemSpec[];
746
565
  size?: number;
747
- disabled?: boolean;
566
+ enabled?: boolean;
748
567
  }
749
568
  interface SizeInputSpec extends FormComponentWithLabelSpec {
750
569
  type: 'sizeinput';
751
570
  constrain?: boolean;
752
- disabled?: boolean;
571
+ enabled?: boolean;
753
572
  }
754
- interface TableSpec {
573
+ interface SliderSpec extends FormComponentSpec {
574
+ type: 'slider';
575
+ label: string;
576
+ min?: number;
577
+ max?: number;
578
+ }
579
+ interface TableSpec {
755
580
  type: 'table';
756
581
  header: string[];
757
582
  cells: string[][];
@@ -760,28 +585,34 @@ interface TextAreaSpec extends FormComponentWithLabelSpec {
760
585
  type: 'textarea';
761
586
  placeholder?: string;
762
587
  maximized?: boolean;
763
- disabled?: boolean;
588
+ enabled?: boolean;
764
589
  }
765
590
  interface UrlInputSpec extends FormComponentWithLabelSpec {
766
591
  type: 'urlinput';
767
592
  filetype?: 'image' | 'media' | 'file';
768
- disabled?: boolean;
593
+ enabled?: boolean;
594
+ }
595
+ interface UrlInputData {
596
+ value: string;
597
+ meta: {
598
+ text?: string;
599
+ };
769
600
  }
770
- declare type BodyComponentSpec = BarSpec | ButtonSpec | CheckboxSpec | TextAreaSpec | InputSpec | ListBoxSpec | SelectBoxSpec | SizeInputSpec | IframeSpec | HtmlPanelSpec | UrlInputSpec | DropZoneSpec | ColorInputSpec | GridSpec | ColorPickerSpec | ImageToolsSpec | AlertBannerSpec | CollectionSpec | LabelSpec | TableSpec | PanelSpec | CustomEditorSpec;
601
+ declare type BodyComponentSpec = BarSpec | ButtonSpec | CheckboxSpec | TextAreaSpec | InputSpec | ListBoxSpec | SelectBoxSpec | SizeInputSpec | SliderSpec | IframeSpec | HtmlPanelSpec | UrlInputSpec | DropZoneSpec | ColorInputSpec | GridSpec | ColorPickerSpec | ImagePreviewSpec | AlertBannerSpec | CollectionSpec | LabelSpec | TableSpec | PanelSpec | CustomEditorSpec;
771
602
  interface BarSpec {
772
603
  type: 'bar';
773
604
  items: BodyComponentSpec[];
774
605
  }
775
606
  interface CommonMenuItemSpec {
776
- disabled?: boolean;
607
+ enabled?: boolean;
777
608
  text?: string;
778
609
  value?: string;
779
610
  meta?: Record<string, any>;
780
611
  shortcut?: string;
781
612
  }
782
613
  interface CommonMenuItemInstanceApi {
783
- isDisabled: () => boolean;
784
- setDisabled: (state: boolean) => void;
614
+ isEnabled: () => boolean;
615
+ setEnabled: (state: boolean) => void;
785
616
  }
786
617
  interface DialogToggleMenuItemSpec extends CommonMenuItemSpec {
787
618
  type?: 'togglemenuitem';
@@ -792,8 +623,9 @@ interface BaseDialogFooterButtonSpec {
792
623
  name?: string;
793
624
  align?: 'start' | 'end';
794
625
  primary?: boolean;
795
- disabled?: boolean;
626
+ enabled?: boolean;
796
627
  icon?: string;
628
+ buttonType?: 'primary' | 'secondary';
797
629
  }
798
630
  interface DialogFooterNormalButtonSpec extends BaseDialogFooterButtonSpec {
799
631
  type: 'submit' | 'cancel' | 'custom';
@@ -821,11 +653,10 @@ declare type DialogData = Record<string, DialogDataItem>;
821
653
  interface DialogInstanceApi<T extends DialogData> {
822
654
  getData: () => T;
823
655
  setData: (data: Partial<T>) => void;
824
- disable: (name: string) => void;
656
+ setEnabled: (name: string, state: boolean) => void;
825
657
  focus: (name: string) => void;
826
658
  showTab: (name: string) => void;
827
659
  redial: (nu: DialogSpec<T>) => void;
828
- enable: (name: string) => void;
829
660
  block: (msg: string) => void;
830
661
  unblock: () => void;
831
662
  close: () => void;
@@ -853,7 +684,7 @@ interface DialogSpec<T extends DialogData> {
853
684
  size?: DialogSize;
854
685
  body: TabPanelSpec | PanelSpec;
855
686
  buttons: DialogFooterButtonSpec[];
856
- initialData?: T;
687
+ initialData?: Partial<T>;
857
688
  onAction?: DialogActionHandler<T>;
858
689
  onChange?: DialogChangeHandler<T>;
859
690
  onSubmit?: DialogSubmitHandler<T>;
@@ -962,15 +793,15 @@ interface ContextBarSpec {
962
793
  scope?: ContextScope;
963
794
  }
964
795
  interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
965
- disabled?: boolean;
796
+ enabled?: boolean;
966
797
  tooltip?: string;
967
798
  icon?: string;
968
799
  text?: string;
969
800
  onSetup?: (api: I) => (api: I) => void;
970
801
  }
971
802
  interface BaseToolbarButtonInstanceApi {
972
- isDisabled: () => boolean;
973
- setDisabled: (state: boolean) => void;
803
+ isEnabled: () => boolean;
804
+ setEnabled: (state: boolean) => void;
974
805
  }
975
806
  interface ToolbarButtonSpec extends BaseToolbarButtonSpec<ToolbarButtonInstanceApi> {
976
807
  type?: 'button';
@@ -1110,6 +941,7 @@ type PublicDialog_d_BarSpec = BarSpec;
1110
941
  type PublicDialog_d_BodyComponentSpec = BodyComponentSpec;
1111
942
  type PublicDialog_d_ButtonSpec = ButtonSpec;
1112
943
  type PublicDialog_d_CheckboxSpec = CheckboxSpec;
944
+ type PublicDialog_d_CollectionItem = CollectionItem;
1113
945
  type PublicDialog_d_CollectionSpec = CollectionSpec;
1114
946
  type PublicDialog_d_ColorInputSpec = ColorInputSpec;
1115
947
  type PublicDialog_d_ColorPickerSpec = ColorPickerSpec;
@@ -1128,7 +960,7 @@ type PublicDialog_d_DropZoneSpec = DropZoneSpec;
1128
960
  type PublicDialog_d_GridSpec = GridSpec;
1129
961
  type PublicDialog_d_HtmlPanelSpec = HtmlPanelSpec;
1130
962
  type PublicDialog_d_IframeSpec = IframeSpec;
1131
- type PublicDialog_d_ImageToolsSpec = ImageToolsSpec;
963
+ type PublicDialog_d_ImagePreviewSpec = ImagePreviewSpec;
1132
964
  type PublicDialog_d_InputSpec = InputSpec;
1133
965
  type PublicDialog_d_LabelSpec = LabelSpec;
1134
966
  type PublicDialog_d_ListBoxSpec = ListBoxSpec;
@@ -1139,10 +971,12 @@ type PublicDialog_d_PanelSpec = PanelSpec;
1139
971
  type PublicDialog_d_SelectBoxSpec = SelectBoxSpec;
1140
972
  type PublicDialog_d_SelectBoxItemSpec = SelectBoxItemSpec;
1141
973
  type PublicDialog_d_SizeInputSpec = SizeInputSpec;
974
+ type PublicDialog_d_SliderSpec = SliderSpec;
1142
975
  type PublicDialog_d_TableSpec = TableSpec;
1143
976
  type PublicDialog_d_TabSpec = TabSpec;
1144
977
  type PublicDialog_d_TabPanelSpec = TabPanelSpec;
1145
978
  type PublicDialog_d_TextAreaSpec = TextAreaSpec;
979
+ type PublicDialog_d_UrlInputData = UrlInputData;
1146
980
  type PublicDialog_d_UrlInputSpec = UrlInputSpec;
1147
981
  type PublicDialog_d_UrlDialogSpec = UrlDialogSpec;
1148
982
  type PublicDialog_d_UrlDialogFooterButtonSpec = UrlDialogFooterButtonSpec;
@@ -1150,7 +984,7 @@ type PublicDialog_d_UrlDialogInstanceApi = UrlDialogInstanceApi;
1150
984
  type PublicDialog_d_UrlDialogActionDetails = UrlDialogActionDetails;
1151
985
  type PublicDialog_d_UrlDialogMessage = UrlDialogMessage;
1152
986
  declare namespace PublicDialog_d {
1153
- export { PublicDialog_d_AlertBannerSpec as AlertBannerSpec, PublicDialog_d_BarSpec as BarSpec, PublicDialog_d_BodyComponentSpec as BodyComponentSpec, PublicDialog_d_ButtonSpec as ButtonSpec, PublicDialog_d_CheckboxSpec as CheckboxSpec, PublicDialog_d_CollectionSpec as CollectionSpec, PublicDialog_d_ColorInputSpec as ColorInputSpec, PublicDialog_d_ColorPickerSpec as ColorPickerSpec, PublicDialog_d_CustomEditorSpec as CustomEditorSpec, PublicDialog_d_CustomEditorInit as CustomEditorInit, PublicDialog_d_CustomEditorInitFn as CustomEditorInitFn, PublicDialog_d_DialogData as DialogData, PublicDialog_d_DialogSize as DialogSize, PublicDialog_d_DialogSpec as DialogSpec, PublicDialog_d_DialogInstanceApi as DialogInstanceApi, PublicDialog_d_DialogFooterButtonSpec as DialogFooterButtonSpec, PublicDialog_d_DialogActionDetails as DialogActionDetails, PublicDialog_d_DialogChangeDetails as DialogChangeDetails, PublicDialog_d_DialogTabChangeDetails as DialogTabChangeDetails, PublicDialog_d_DropZoneSpec as DropZoneSpec, PublicDialog_d_GridSpec as GridSpec, PublicDialog_d_HtmlPanelSpec as HtmlPanelSpec, PublicDialog_d_IframeSpec as IframeSpec, PublicDialog_d_ImageToolsSpec as ImageToolsSpec, PublicDialog_d_InputSpec as InputSpec, PublicDialog_d_LabelSpec as LabelSpec, PublicDialog_d_ListBoxSpec as ListBoxSpec, PublicDialog_d_ListBoxItemSpec as ListBoxItemSpec, PublicDialog_d_ListBoxNestedItemSpec as ListBoxNestedItemSpec, PublicDialog_d_ListBoxSingleItemSpec as ListBoxSingleItemSpec, PublicDialog_d_PanelSpec as PanelSpec, PublicDialog_d_SelectBoxSpec as SelectBoxSpec, PublicDialog_d_SelectBoxItemSpec as SelectBoxItemSpec, PublicDialog_d_SizeInputSpec as SizeInputSpec, PublicDialog_d_TableSpec as TableSpec, PublicDialog_d_TabSpec as TabSpec, PublicDialog_d_TabPanelSpec as TabPanelSpec, PublicDialog_d_TextAreaSpec as TextAreaSpec, PublicDialog_d_UrlInputSpec as UrlInputSpec, PublicDialog_d_UrlDialogSpec as UrlDialogSpec, PublicDialog_d_UrlDialogFooterButtonSpec as UrlDialogFooterButtonSpec, PublicDialog_d_UrlDialogInstanceApi as UrlDialogInstanceApi, PublicDialog_d_UrlDialogActionDetails as UrlDialogActionDetails, PublicDialog_d_UrlDialogMessage as UrlDialogMessage, };
987
+ export { PublicDialog_d_AlertBannerSpec as AlertBannerSpec, PublicDialog_d_BarSpec as BarSpec, PublicDialog_d_BodyComponentSpec as BodyComponentSpec, PublicDialog_d_ButtonSpec as ButtonSpec, PublicDialog_d_CheckboxSpec as CheckboxSpec, PublicDialog_d_CollectionItem as CollectionItem, PublicDialog_d_CollectionSpec as CollectionSpec, PublicDialog_d_ColorInputSpec as ColorInputSpec, PublicDialog_d_ColorPickerSpec as ColorPickerSpec, PublicDialog_d_CustomEditorSpec as CustomEditorSpec, PublicDialog_d_CustomEditorInit as CustomEditorInit, PublicDialog_d_CustomEditorInitFn as CustomEditorInitFn, PublicDialog_d_DialogData as DialogData, PublicDialog_d_DialogSize as DialogSize, PublicDialog_d_DialogSpec as DialogSpec, PublicDialog_d_DialogInstanceApi as DialogInstanceApi, PublicDialog_d_DialogFooterButtonSpec as DialogFooterButtonSpec, PublicDialog_d_DialogActionDetails as DialogActionDetails, PublicDialog_d_DialogChangeDetails as DialogChangeDetails, PublicDialog_d_DialogTabChangeDetails as DialogTabChangeDetails, PublicDialog_d_DropZoneSpec as DropZoneSpec, PublicDialog_d_GridSpec as GridSpec, PublicDialog_d_HtmlPanelSpec as HtmlPanelSpec, PublicDialog_d_IframeSpec as IframeSpec, PublicDialog_d_ImagePreviewSpec as ImagePreviewSpec, PublicDialog_d_InputSpec as InputSpec, PublicDialog_d_LabelSpec as LabelSpec, PublicDialog_d_ListBoxSpec as ListBoxSpec, PublicDialog_d_ListBoxItemSpec as ListBoxItemSpec, PublicDialog_d_ListBoxNestedItemSpec as ListBoxNestedItemSpec, PublicDialog_d_ListBoxSingleItemSpec as ListBoxSingleItemSpec, PublicDialog_d_PanelSpec as PanelSpec, PublicDialog_d_SelectBoxSpec as SelectBoxSpec, PublicDialog_d_SelectBoxItemSpec as SelectBoxItemSpec, PublicDialog_d_SizeInputSpec as SizeInputSpec, PublicDialog_d_SliderSpec as SliderSpec, PublicDialog_d_TableSpec as TableSpec, PublicDialog_d_TabSpec as TabSpec, PublicDialog_d_TabPanelSpec as TabPanelSpec, PublicDialog_d_TextAreaSpec as TextAreaSpec, PublicDialog_d_UrlInputData as UrlInputData, PublicDialog_d_UrlInputSpec as UrlInputSpec, PublicDialog_d_UrlDialogSpec as UrlDialogSpec, PublicDialog_d_UrlDialogFooterButtonSpec as UrlDialogFooterButtonSpec, PublicDialog_d_UrlDialogInstanceApi as UrlDialogInstanceApi, PublicDialog_d_UrlDialogActionDetails as UrlDialogActionDetails, PublicDialog_d_UrlDialogMessage as UrlDialogMessage, };
1154
988
  }
1155
989
  type PublicInlineContent_d_AutocompleterSpec = AutocompleterSpec;
1156
990
  type PublicInlineContent_d_AutocompleterItemSpec = AutocompleterItemSpec;
@@ -1231,8 +1065,8 @@ interface BaseMenuButtonSpec {
1231
1065
  onSetup?: (api: BaseMenuButtonInstanceApi) => (api: BaseMenuButtonInstanceApi) => void;
1232
1066
  }
1233
1067
  interface BaseMenuButtonInstanceApi {
1234
- isDisabled: () => boolean;
1235
- setDisabled: (state: boolean) => void;
1068
+ isEnabled: () => boolean;
1069
+ setEnabled: (state: boolean) => void;
1236
1070
  isActive: () => boolean;
1237
1071
  setActive: (state: boolean) => void;
1238
1072
  }
@@ -1261,10 +1095,9 @@ interface ToolbarSplitButtonSpec {
1261
1095
  onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
1262
1096
  }
1263
1097
  interface ToolbarSplitButtonInstanceApi {
1264
- isDisabled: () => boolean;
1265
- setDisabled: (state: boolean) => void;
1098
+ isEnabled: () => boolean;
1099
+ setEnabled: (state: boolean) => void;
1266
1100
  setIconFill: (id: string, value: string) => void;
1267
- setIconStroke: (id: string, value: string) => void;
1268
1101
  isActive: () => boolean;
1269
1102
  setActive: (state: boolean) => void;
1270
1103
  }
@@ -1306,14 +1139,137 @@ interface Registry$1 {
1306
1139
  sidebars: Record<string, SidebarSpec>;
1307
1140
  };
1308
1141
  }
1142
+ interface AutocompleteLookupData {
1143
+ readonly matchText: string;
1144
+ readonly items: AutocompleterContents[];
1145
+ readonly columns: ColumnTypes$1;
1146
+ readonly onAction: (autoApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
1147
+ readonly highlightOn: string[];
1148
+ }
1149
+ interface AutocompleterEventArgs {
1150
+ readonly lookupData: AutocompleteLookupData[];
1151
+ }
1152
+ interface RangeLikeObject {
1153
+ startContainer: Node;
1154
+ startOffset: number;
1155
+ endContainer: Node;
1156
+ endOffset: number;
1157
+ }
1158
+ declare type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
1159
+ declare type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
1160
+ declare type Format = ApplyFormat | RemoveFormat;
1161
+ declare type Formats = Record<string, Format | Format[]>;
1162
+ declare type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string);
1163
+ declare type FormatVars = Record<string, string | null>;
1164
+ interface BaseFormat<T> {
1165
+ ceFalseOverride?: boolean;
1166
+ classes?: string | string[];
1167
+ collapsed?: boolean;
1168
+ exact?: boolean;
1169
+ expand?: boolean;
1170
+ links?: boolean;
1171
+ mixed?: boolean;
1172
+ block_expand?: boolean;
1173
+ onmatch?: (node: Node, fmt: T, itemName: string) => boolean;
1174
+ remove?: 'none' | 'empty' | 'all';
1175
+ remove_similar?: boolean;
1176
+ split?: boolean;
1177
+ deep?: boolean;
1178
+ preserve_attributes?: string[];
1179
+ }
1180
+ interface Block {
1181
+ block: string;
1182
+ list_block?: string;
1183
+ wrapper?: boolean;
1184
+ }
1185
+ interface Inline {
1186
+ inline: string;
1187
+ }
1188
+ interface Selector {
1189
+ selector: string;
1190
+ inherit?: boolean;
1191
+ }
1192
+ interface CommonFormat<T> extends BaseFormat<T> {
1193
+ attributes?: Record<string, FormatAttrOrStyleValue>;
1194
+ styles?: Record<string, FormatAttrOrStyleValue>;
1195
+ toggle?: boolean;
1196
+ preview?: string | false;
1197
+ onformat?: (elm: Node, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
1198
+ clear_child_styles?: boolean;
1199
+ merge_siblings?: boolean;
1200
+ merge_with_parents?: boolean;
1201
+ }
1202
+ interface BlockFormat extends Block, CommonFormat<BlockFormat> {
1203
+ }
1204
+ interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
1205
+ }
1206
+ interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
1207
+ }
1208
+ interface CommonRemoveFormat<T> extends BaseFormat<T> {
1209
+ attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
1210
+ styles?: string[] | Record<string, FormatAttrOrStyleValue>;
1211
+ }
1212
+ interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
1213
+ }
1214
+ interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
1215
+ }
1216
+ interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
1217
+ }
1218
+ interface Filter<C extends Function> {
1219
+ name: string;
1220
+ callbacks: C[];
1221
+ }
1222
+ interface ParserArgs {
1223
+ getInner?: boolean | number;
1224
+ forced_root_block?: boolean | string;
1225
+ context?: string;
1226
+ isRootContent?: boolean;
1227
+ format?: string;
1228
+ invalid?: boolean;
1229
+ no_events?: boolean;
1230
+ [key: string]: any;
1231
+ }
1232
+ declare type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
1233
+ interface ParserFilter extends Filter<ParserFilterCallback> {
1234
+ }
1235
+ interface DomParserSettings {
1236
+ allow_html_data_urls?: boolean;
1237
+ allow_svg_data_urls?: boolean;
1238
+ allow_conditional_comments?: boolean;
1239
+ allow_html_in_named_anchor?: boolean;
1240
+ allow_script_urls?: boolean;
1241
+ allow_unsafe_link_target?: boolean;
1242
+ convert_fonts_to_spans?: boolean;
1243
+ fix_list_elements?: boolean;
1244
+ font_size_legacy_values?: string;
1245
+ forced_root_block?: boolean | string;
1246
+ forced_root_block_attrs?: Record<string, string>;
1247
+ preserve_cdata?: boolean;
1248
+ remove_trailing_brs?: boolean;
1249
+ root_name?: string;
1250
+ validate?: boolean;
1251
+ inline_styles?: boolean;
1252
+ blob_cache?: BlobCache;
1253
+ document?: Document;
1254
+ }
1255
+ interface DomParser {
1256
+ schema: Schema;
1257
+ addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
1258
+ getAttributeFilters: () => ParserFilter[];
1259
+ removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
1260
+ addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
1261
+ getNodeFilters: () => ParserFilter[];
1262
+ removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
1263
+ parse: (html: string, args?: ParserArgs) => AstNode;
1264
+ }
1309
1265
  interface StyleSheetLoaderSettings {
1310
1266
  maxLoadTime?: number;
1311
1267
  contentCssCors?: boolean;
1312
1268
  referrerPolicy?: ReferrerPolicy;
1313
1269
  }
1314
1270
  interface StyleSheetLoader {
1315
- load: (url: string, success: () => void, failure?: () => void) => void;
1316
- loadAll: (urls: string[], success: (urls: string[]) => void, failure: (urls: string[]) => void) => void;
1271
+ load: (url: string) => Promise<void>;
1272
+ loadAll: (urls: string[]) => Promise<string[]>;
1317
1273
  unload: (url: string) => void;
1318
1274
  unloadAll: (urls: string[]) => void;
1319
1275
  _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
@@ -1322,9 +1278,8 @@ declare type Registry = Registry$1;
1322
1278
  interface EditorUiApi {
1323
1279
  show: () => void;
1324
1280
  hide: () => void;
1325
- enable: () => void;
1326
- disable: () => void;
1327
- isDisabled: () => boolean;
1281
+ setEnabled: (state: boolean) => void;
1282
+ isEnabled: () => boolean;
1328
1283
  }
1329
1284
  interface EditorUi extends EditorUiApi {
1330
1285
  registry: Registry;
@@ -1336,54 +1291,355 @@ type Ui_d_EditorUi = EditorUi;
1336
1291
  declare namespace Ui_d {
1337
1292
  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, };
1338
1293
  }
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;
1294
+ interface WindowParams {
1295
+ readonly inline?: 'cursor' | 'toolbar';
1296
+ readonly ariaAttrs?: boolean;
1344
1297
  }
1345
- declare type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
1346
- editorContainer: HTMLElement;
1347
- iframeContainer: HTMLElement;
1348
- height?: number;
1349
- iframeHeight?: number;
1350
- api?: EditorUiApi;
1351
- };
1352
- declare type SetupCallback = (editor: Editor) => void;
1353
- declare type FilePickerCallback = (callback: Function, value: any, meta: Record<string, any>) => void;
1354
- declare type FilePickerValidationStatus = 'valid' | 'unknown' | 'invalid' | 'none';
1355
- declare type FilePickerValidationCallback = (info: {
1356
- type: string;
1357
- url: string;
1358
- }, callback: (validation: {
1359
- status: FilePickerValidationStatus;
1298
+ declare type InstanceApi<T> = UrlDialogInstanceApi | DialogInstanceApi<T>;
1299
+ interface WindowManagerImpl {
1300
+ open: <T>(config: DialogSpec<T>, params: WindowParams, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
1301
+ openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
1302
+ alert: (message: string, callback: () => void) => void;
1303
+ confirm: (message: string, callback: (state: boolean) => void) => void;
1304
+ close: (dialog: InstanceApi<any>) => void;
1305
+ }
1306
+ interface WindowManager {
1307
+ open: <T>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
1308
+ openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
1309
+ alert: (message: string, callback?: () => void, scope?: any) => void;
1310
+ confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
1311
+ close: () => void;
1312
+ }
1313
+ interface ExecCommandEvent {
1314
+ command: string;
1315
+ ui?: boolean;
1316
+ value?: any;
1317
+ }
1318
+ interface BeforeGetContentEvent extends GetContentArgs {
1319
+ selection?: boolean;
1320
+ }
1321
+ interface GetContentEvent extends BeforeGetContentEvent {
1322
+ content: string;
1323
+ }
1324
+ interface BeforeSetContentEvent extends SetContentArgs {
1325
+ content: string;
1326
+ selection?: boolean;
1327
+ }
1328
+ interface SetContentEvent extends BeforeSetContentEvent {
1329
+ content: string;
1330
+ }
1331
+ interface NewBlockEvent {
1332
+ newBlock: Element;
1333
+ }
1334
+ interface NodeChangeEvent {
1335
+ element: Element;
1336
+ parents: Node[];
1337
+ selectionChange?: boolean;
1338
+ initial?: boolean;
1339
+ }
1340
+ interface FormatEvent {
1341
+ format: string;
1342
+ vars?: FormatVars;
1343
+ node?: Node | RangeLikeObject;
1344
+ }
1345
+ interface ObjectResizeEvent {
1346
+ target: HTMLElement;
1347
+ width: number;
1348
+ height: number;
1349
+ origin: string;
1350
+ }
1351
+ interface ObjectSelectedEvent {
1352
+ target: Node;
1353
+ targetClone?: Node;
1354
+ }
1355
+ interface ScrollIntoViewEvent {
1356
+ elm: HTMLElement;
1357
+ alignToTop: boolean;
1358
+ }
1359
+ interface SetSelectionRangeEvent {
1360
+ range: Range;
1361
+ forward: boolean;
1362
+ }
1363
+ interface ShowCaretEvent {
1364
+ target: Node;
1365
+ direction: number;
1366
+ before: boolean;
1367
+ }
1368
+ interface SwitchModeEvent {
1369
+ mode: string;
1370
+ }
1371
+ interface AddUndoEvent {
1372
+ level: UndoLevel;
1373
+ lastLevel: UndoLevel;
1374
+ originalEvent: Event;
1375
+ }
1376
+ interface UndoRedoEvent {
1377
+ level: UndoLevel;
1378
+ }
1379
+ interface WindowEvent<T extends DialogData> {
1380
+ dialog: InstanceApi<T>;
1381
+ }
1382
+ interface ProgressStateEvent {
1383
+ state: boolean;
1384
+ time?: number;
1385
+ }
1386
+ interface AfterProgressStateEvent {
1387
+ state: boolean;
1388
+ }
1389
+ interface PlaceholderToggleEvent {
1390
+ state: boolean;
1391
+ }
1392
+ interface LoadErrorEvent {
1360
1393
  message: string;
1361
- }) => void) => void;
1362
- declare type URLConverter = (url: string, name: string, elm?: HTMLElement) => string;
1363
- declare type URLConverterCallback = (url: string, node: Node, on_save: boolean, name: string) => void;
1364
- interface ToolbarGroup {
1365
- name?: string;
1366
- items: string[];
1367
1394
  }
1368
- declare type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
1369
- interface BaseEditorSettings {
1370
- add_form_submit_trigger?: boolean;
1371
- add_unload_trigger?: boolean;
1372
- allow_conditional_comments?: boolean;
1373
- allow_html_data_urls?: boolean;
1374
- allow_html_in_named_anchor?: boolean;
1375
- allow_script_urls?: boolean;
1376
- allow_svg_data_urls?: boolean;
1377
- allow_unsafe_link_target?: boolean;
1378
- anchor_bottom?: false | string;
1379
- anchor_top?: false | string;
1380
- auto_focus?: string | true;
1381
- automatic_uploads?: boolean;
1382
- base_url?: string;
1383
- block_formats?: string;
1384
- block_unsupported_drop?: boolean;
1385
- body_id?: string;
1386
- body_class?: string;
1395
+ interface PreProcessEvent extends ParserArgs {
1396
+ node: Element;
1397
+ }
1398
+ interface PostProcessEvent extends ParserArgs {
1399
+ content: string;
1400
+ }
1401
+ interface PastePlainTextToggleEvent {
1402
+ state: boolean;
1403
+ }
1404
+ interface PastePreProcessEvent {
1405
+ content: string;
1406
+ readonly internal: boolean;
1407
+ }
1408
+ interface PastePostProcessEvent {
1409
+ node: HTMLElement;
1410
+ readonly internal: boolean;
1411
+ }
1412
+ interface NewTableRowEvent {
1413
+ node: HTMLTableRowElement;
1414
+ }
1415
+ interface NewTableCellEvent {
1416
+ node: HTMLTableCellElement;
1417
+ }
1418
+ interface TableEventData {
1419
+ readonly structure: boolean;
1420
+ readonly style: boolean;
1421
+ }
1422
+ interface TableModifiedEvent extends TableEventData {
1423
+ readonly table: HTMLTableElement;
1424
+ }
1425
+ interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
1426
+ 'activate': {
1427
+ relatedTarget: Editor;
1428
+ };
1429
+ 'deactivate': {
1430
+ relatedTarget: Editor;
1431
+ };
1432
+ 'focus': {
1433
+ blurredEditor: Editor;
1434
+ };
1435
+ 'blur': {
1436
+ focusedEditor: Editor;
1437
+ };
1438
+ 'resize': UIEvent;
1439
+ 'scroll': UIEvent;
1440
+ 'detach': {};
1441
+ 'remove': {};
1442
+ 'init': {};
1443
+ 'ScrollIntoView': ScrollIntoViewEvent;
1444
+ 'AfterScrollIntoView': ScrollIntoViewEvent;
1445
+ 'ObjectResized': ObjectResizeEvent;
1446
+ 'ObjectResizeStart': ObjectResizeEvent;
1447
+ 'SwitchMode': SwitchModeEvent;
1448
+ 'ScrollWindow': UIEvent;
1449
+ 'ResizeWindow': UIEvent;
1450
+ 'SkinLoaded': {};
1451
+ 'SkinLoadError': LoadErrorEvent;
1452
+ 'PluginLoadError': LoadErrorEvent;
1453
+ 'ModelLoadError': LoadErrorEvent;
1454
+ 'IconsLoadError': LoadErrorEvent;
1455
+ 'ThemeLoadError': LoadErrorEvent;
1456
+ 'LanguageLoadError': LoadErrorEvent;
1457
+ 'BeforeExecCommand': ExecCommandEvent;
1458
+ 'ExecCommand': ExecCommandEvent;
1459
+ 'NodeChange': NodeChangeEvent;
1460
+ 'FormatApply': FormatEvent;
1461
+ 'FormatRemove': FormatEvent;
1462
+ 'ShowCaret': ShowCaretEvent;
1463
+ 'SelectionChange': {};
1464
+ 'ObjectSelected': ObjectSelectedEvent;
1465
+ 'BeforeObjectSelected': ObjectSelectedEvent;
1466
+ 'GetSelectionRange': {
1467
+ range: Range;
1468
+ };
1469
+ 'SetSelectionRange': SetSelectionRangeEvent;
1470
+ 'AfterSetSelectionRange': SetSelectionRangeEvent;
1471
+ 'BeforeGetContent': BeforeGetContentEvent;
1472
+ 'GetContent': GetContentEvent;
1473
+ 'BeforeSetContent': BeforeSetContentEvent;
1474
+ 'SetContent': SetContentEvent;
1475
+ 'LoadContent': {};
1476
+ 'PreviewFormats': {};
1477
+ 'AfterPreviewFormats': {};
1478
+ 'ScriptsLoaded': {};
1479
+ 'PreInit': {};
1480
+ 'PostRender': {};
1481
+ 'NewBlock': NewBlockEvent;
1482
+ 'ClearUndos': {};
1483
+ 'TypingUndo': {};
1484
+ 'Redo': UndoRedoEvent;
1485
+ 'Undo': UndoRedoEvent;
1486
+ 'BeforeAddUndo': AddUndoEvent;
1487
+ 'AddUndo': AddUndoEvent;
1488
+ 'CloseWindow': WindowEvent<any>;
1489
+ 'OpenWindow': WindowEvent<any>;
1490
+ 'ProgressState': ProgressStateEvent;
1491
+ 'AfterProgressState': AfterProgressStateEvent;
1492
+ 'PlaceholderToggle': PlaceholderToggleEvent;
1493
+ 'tap': TouchEvent;
1494
+ 'longpress': TouchEvent;
1495
+ 'longpresscancel': {};
1496
+ 'PreProcess': PreProcessEvent;
1497
+ 'PostProcess': PostProcessEvent;
1498
+ 'AutocompleterStart': AutocompleterEventArgs;
1499
+ 'AutocompleterUpdate': AutocompleterEventArgs;
1500
+ 'AutocompleterEnd': {};
1501
+ 'PastePlainTextToggle': PastePlainTextToggleEvent;
1502
+ 'PastePreProcess': PastePreProcessEvent;
1503
+ 'PastePostProcess': PastePostProcessEvent;
1504
+ 'TableModified': TableModifiedEvent;
1505
+ 'NewRow': NewTableRowEvent;
1506
+ 'NewCell': NewTableCellEvent;
1507
+ }
1508
+ interface EditorManagerEventMap {
1509
+ 'AddEditor': {
1510
+ editor: Editor;
1511
+ };
1512
+ 'RemoveEditor': {
1513
+ editor: Editor;
1514
+ };
1515
+ 'BeforeUnload': {
1516
+ returnValue: any;
1517
+ };
1518
+ }
1519
+ type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
1520
+ type EventTypes_d_BeforeGetContentEvent = BeforeGetContentEvent;
1521
+ type EventTypes_d_GetContentEvent = GetContentEvent;
1522
+ type EventTypes_d_BeforeSetContentEvent = BeforeSetContentEvent;
1523
+ type EventTypes_d_SetContentEvent = SetContentEvent;
1524
+ type EventTypes_d_NewBlockEvent = NewBlockEvent;
1525
+ type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
1526
+ type EventTypes_d_FormatEvent = FormatEvent;
1527
+ type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
1528
+ type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
1529
+ type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
1530
+ type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
1531
+ type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
1532
+ type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
1533
+ type EventTypes_d_AddUndoEvent = AddUndoEvent;
1534
+ type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
1535
+ type EventTypes_d_WindowEvent<_0> = WindowEvent<_0>;
1536
+ type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
1537
+ type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
1538
+ type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
1539
+ type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
1540
+ type EventTypes_d_PreProcessEvent = PreProcessEvent;
1541
+ type EventTypes_d_PostProcessEvent = PostProcessEvent;
1542
+ type EventTypes_d_PastePlainTextToggleEvent = PastePlainTextToggleEvent;
1543
+ type EventTypes_d_PastePreProcessEvent = PastePreProcessEvent;
1544
+ type EventTypes_d_PastePostProcessEvent = PastePostProcessEvent;
1545
+ type EventTypes_d_NewTableRowEvent = NewTableRowEvent;
1546
+ type EventTypes_d_NewTableCellEvent = NewTableCellEvent;
1547
+ type EventTypes_d_TableEventData = TableEventData;
1548
+ type EventTypes_d_TableModifiedEvent = TableModifiedEvent;
1549
+ type EventTypes_d_EditorEventMap = EditorEventMap;
1550
+ type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
1551
+ declare namespace EventTypes_d {
1552
+ export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_BeforeGetContentEvent as BeforeGetContentEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_BeforeSetContentEvent as BeforeSetContentEvent, 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_PastePlainTextToggleEvent as PastePlainTextToggleEvent, EventTypes_d_PastePreProcessEvent as PastePreProcessEvent, EventTypes_d_PastePostProcessEvent as PastePostProcessEvent, EventTypes_d_NewTableRowEvent as NewTableRowEvent, EventTypes_d_NewTableCellEvent as NewTableCellEvent, EventTypes_d_TableEventData as TableEventData, EventTypes_d_TableModifiedEvent as TableModifiedEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
1553
+ }
1554
+ type Format_d_Formats = Formats;
1555
+ type Format_d_Format = Format;
1556
+ type Format_d_ApplyFormat = ApplyFormat;
1557
+ type Format_d_BlockFormat = BlockFormat;
1558
+ type Format_d_InlineFormat = InlineFormat;
1559
+ type Format_d_SelectorFormat = SelectorFormat;
1560
+ type Format_d_RemoveFormat = RemoveFormat;
1561
+ type Format_d_RemoveBlockFormat = RemoveBlockFormat;
1562
+ type Format_d_RemoveInlineFormat = RemoveInlineFormat;
1563
+ type Format_d_RemoveSelectorFormat = RemoveSelectorFormat;
1564
+ declare namespace Format_d {
1565
+ export { Format_d_Formats as Formats, Format_d_Format as Format, Format_d_ApplyFormat as ApplyFormat, Format_d_BlockFormat as BlockFormat, Format_d_InlineFormat as InlineFormat, Format_d_SelectorFormat as SelectorFormat, Format_d_RemoveFormat as RemoveFormat, Format_d_RemoveBlockFormat as RemoveBlockFormat, Format_d_RemoveInlineFormat as RemoveInlineFormat, Format_d_RemoveSelectorFormat as RemoveSelectorFormat, };
1566
+ }
1567
+ declare type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
1568
+ declare type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
1569
+ interface Separator {
1570
+ title: string;
1571
+ }
1572
+ interface FormatReference {
1573
+ title: string;
1574
+ format: string;
1575
+ icon?: string;
1576
+ }
1577
+ interface NestedFormatting {
1578
+ title: string;
1579
+ items: Array<FormatReference | StyleFormat>;
1580
+ }
1581
+ interface CommonStyleFormat {
1582
+ name?: string;
1583
+ title: string;
1584
+ icon?: string;
1585
+ }
1586
+ interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
1587
+ }
1588
+ interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
1589
+ }
1590
+ interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
1591
+ }
1592
+ declare type EntityEncoding = 'named' | 'numeric' | 'raw' | 'named,numeric' | 'named+numeric' | 'numeric,named' | 'numeric+named';
1593
+ interface ContentLanguage {
1594
+ readonly title: string;
1595
+ readonly code: string;
1596
+ readonly customCode?: string;
1597
+ }
1598
+ declare type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
1599
+ editorContainer: HTMLElement;
1600
+ iframeContainer: HTMLElement;
1601
+ height?: number;
1602
+ iframeHeight?: number;
1603
+ api?: EditorUiApi;
1604
+ };
1605
+ declare type SetupCallback = (editor: Editor) => void;
1606
+ declare type FilePickerCallback = (callback: Function, value: any, meta: Record<string, any>) => void;
1607
+ declare type FilePickerValidationStatus = 'valid' | 'unknown' | 'invalid' | 'none';
1608
+ declare type FilePickerValidationCallback = (info: {
1609
+ type: string;
1610
+ url: string;
1611
+ }, callback: (validation: {
1612
+ status: FilePickerValidationStatus;
1613
+ message: string;
1614
+ }) => void) => void;
1615
+ declare type PastePreProcessFn = (editor: Editor, args: PastePreProcessEvent) => void;
1616
+ declare type PastePostProcessFn = (editor: Editor, args: PastePostProcessEvent) => void;
1617
+ declare type URLConverter = (url: string, name: string, elm?: HTMLElement) => string;
1618
+ declare type URLConverterCallback = (url: string, node: Node, on_save: boolean, name: string) => string;
1619
+ interface ToolbarGroup {
1620
+ name?: string;
1621
+ items: string[];
1622
+ }
1623
+ declare type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
1624
+ interface BaseEditorOptions {
1625
+ a11y_advanced_options?: boolean;
1626
+ add_form_submit_trigger?: boolean;
1627
+ add_unload_trigger?: boolean;
1628
+ allow_conditional_comments?: boolean;
1629
+ allow_html_data_urls?: boolean;
1630
+ allow_html_in_named_anchor?: boolean;
1631
+ allow_script_urls?: boolean;
1632
+ allow_svg_data_urls?: boolean;
1633
+ allow_unsafe_link_target?: boolean;
1634
+ anchor_bottom?: false | string;
1635
+ anchor_top?: false | string;
1636
+ auto_focus?: string | true;
1637
+ automatic_uploads?: boolean;
1638
+ base_url?: string;
1639
+ block_formats?: string;
1640
+ block_unsupported_drop?: boolean;
1641
+ body_id?: string;
1642
+ body_class?: string;
1387
1643
  br_in_pre?: boolean;
1388
1644
  br_newline_selector?: string;
1389
1645
  browser_spellcheck?: boolean;
@@ -1395,10 +1651,8 @@ interface BaseEditorSettings {
1395
1651
  content_css_cors?: boolean;
1396
1652
  content_security_policy?: string;
1397
1653
  content_style?: string;
1398
- deprecation_warnings?: boolean;
1399
- font_css?: string | string[];
1400
1654
  content_langs?: ContentLanguage[];
1401
- contextmenu?: string | false;
1655
+ contextmenu?: string | string[] | false;
1402
1656
  contextmenu_never_use_native?: boolean;
1403
1657
  convert_fonts_to_spans?: boolean;
1404
1658
  convert_urls?: boolean;
@@ -1406,13 +1660,15 @@ interface BaseEditorSettings {
1406
1660
  custom_elements?: string;
1407
1661
  custom_ui_selector?: string;
1408
1662
  custom_undo_redo_levels?: number;
1663
+ deprecation_warnings?: boolean;
1409
1664
  directionality?: 'ltr' | 'rtl';
1410
1665
  doctype?: string;
1411
1666
  document_base_url?: string;
1667
+ editable_class?: string;
1412
1668
  element_format?: 'xhtml' | 'html';
1413
1669
  elementpath?: boolean;
1414
1670
  encoding?: string;
1415
- end_container_on_empty_block?: boolean;
1671
+ end_container_on_empty_block?: boolean | string;
1416
1672
  entities?: string;
1417
1673
  entity_encoding?: EntityEncoding;
1418
1674
  extended_valid_elements?: string;
@@ -1423,23 +1679,22 @@ interface BaseEditorSettings {
1423
1679
  fix_list_elements?: boolean;
1424
1680
  fixed_toolbar_container?: string;
1425
1681
  fixed_toolbar_container_target?: HTMLElement;
1426
- font_formats?: string;
1682
+ font_css?: string | string[];
1683
+ font_family_formats?: string;
1427
1684
  font_size_classes?: string;
1428
1685
  font_size_legacy_values?: string;
1429
1686
  font_size_style_values?: string;
1430
- fontsize_formats?: string;
1431
- force_hex_style_colors?: boolean;
1432
- forced_root_block?: boolean | string;
1687
+ font_size_formats?: string;
1688
+ forced_root_block?: string;
1433
1689
  forced_root_block_attrs?: Record<string, string>;
1434
1690
  formats?: Formats;
1435
- gecko_spellcheck?: boolean;
1436
1691
  height?: number | string;
1437
1692
  hidden_input?: boolean;
1438
1693
  icons?: string;
1439
1694
  icons_url?: string;
1440
1695
  id?: string;
1441
1696
  iframe_aria_text?: string;
1442
- images_dataimg_filter?: (imgElm: HTMLImageElement) => boolean;
1697
+ iframe_attrs?: Record<string, string>;
1443
1698
  images_file_types?: string;
1444
1699
  images_replace_blob_uris?: boolean;
1445
1700
  images_reuse_filename?: boolean;
@@ -1463,7 +1718,7 @@ interface BaseEditorSettings {
1463
1718
  language?: string;
1464
1719
  language_load?: boolean;
1465
1720
  language_url?: string;
1466
- lineheight_formats?: string;
1721
+ line_height_formats?: string;
1467
1722
  max_height?: number;
1468
1723
  max_width?: number;
1469
1724
  menu?: Record<string, {
@@ -1473,13 +1728,26 @@ interface BaseEditorSettings {
1473
1728
  menubar?: boolean | string;
1474
1729
  min_height?: number;
1475
1730
  min_width?: number;
1731
+ model?: string;
1732
+ model_url?: string;
1733
+ newline_behavior?: 'block' | 'linebreak' | 'invert' | 'default';
1476
1734
  no_newline_selector?: string;
1735
+ noneditable_class?: string;
1736
+ noneditable_regexp?: RegExp | RegExp[];
1477
1737
  nowrap?: boolean;
1478
1738
  object_resizing?: boolean | string;
1479
- padd_empty_with_br?: boolean;
1739
+ paste_as_text?: boolean;
1740
+ paste_block_drop?: boolean;
1741
+ paste_data_images?: boolean;
1742
+ paste_merge_formats?: boolean;
1743
+ paste_postprocess?: PastePostProcessFn;
1744
+ paste_preprocess?: PastePreProcessFn;
1745
+ paste_remove_styles_if_webkit?: boolean;
1746
+ paste_tab_spaces?: number;
1747
+ paste_webkit_styles?: string;
1480
1748
  placeholder?: string;
1481
1749
  preserve_cdata?: boolean;
1482
- preview_styles?: boolean | string;
1750
+ preview_styles?: false | string;
1483
1751
  protect?: RegExp[];
1484
1752
  readonly?: boolean;
1485
1753
  referrer_policy?: ReferrerPolicy;
@@ -1493,16 +1761,20 @@ interface BaseEditorSettings {
1493
1761
  schema?: SchemaType;
1494
1762
  selector?: string;
1495
1763
  setup?: SetupCallback;
1764
+ sidebar_show?: string;
1496
1765
  skin?: boolean | string;
1497
1766
  skin_url?: string;
1767
+ smart_paste?: boolean;
1498
1768
  statusbar?: boolean;
1499
1769
  style_formats?: AllowedFormat[];
1500
1770
  style_formats_autohide?: boolean;
1501
1771
  style_formats_merge?: boolean;
1502
1772
  submit_patch?: boolean;
1503
1773
  suffix?: string;
1774
+ table_tab_navigation?: boolean;
1504
1775
  target?: HTMLElement;
1505
- theme?: string | ThemeInitFunc;
1776
+ text_patterns?: RawPattern[] | false;
1777
+ theme?: string | ThemeInitFunc | false;
1506
1778
  theme_url?: string;
1507
1779
  toolbar?: boolean | string | string[] | Array<ToolbarGroup>;
1508
1780
  toolbar1?: string;
@@ -1515,10 +1787,12 @@ interface BaseEditorSettings {
1515
1787
  toolbar8?: string;
1516
1788
  toolbar9?: string;
1517
1789
  toolbar_mode?: ToolbarMode;
1790
+ toolbar_sticky?: boolean;
1791
+ toolbar_sticky_offset?: number;
1518
1792
  typeahead_urls?: boolean;
1519
1793
  url_converter?: URLConverter;
1520
1794
  url_converter_scope?: any;
1521
- urlconverter_callback?: string | URLConverterCallback;
1795
+ urlconverter_callback?: URLConverterCallback;
1522
1796
  valid_children?: string;
1523
1797
  valid_classes?: string | Record<string, string>;
1524
1798
  valid_elements?: string;
@@ -1528,107 +1802,34 @@ interface BaseEditorSettings {
1528
1802
  visual_anchor_class?: string;
1529
1803
  visual_table_class?: string;
1530
1804
  width?: number | string;
1531
- toolbar_drawer?: false | 'floating' | 'sliding' | 'scrolling';
1532
- editor_deselector?: string;
1533
- editor_selector?: string;
1534
- elements?: string;
1535
- filepicker_validator_handler?: FilePickerValidationCallback;
1536
- mode?: 'exact' | 'textareas' | 'specific_textareas';
1537
- types?: Record<string, any>[];
1538
- block_elements?: string;
1539
- boolean_attributes?: string;
1540
- move_caret_before_on_enter_elements?: string;
1541
- non_empty_elements?: string;
1542
- self_closing_elements?: string;
1543
- short_ended_elements?: string;
1544
- text_block_elements?: string;
1545
- text_inline_elements?: string;
1546
- whitespace_elements?: string;
1547
- special?: string;
1548
1805
  disable_nodechange?: boolean;
1549
1806
  forced_plugins?: string | string[];
1550
1807
  plugin_base_urls?: Record<string, string>;
1551
1808
  service_message?: string;
1552
- validate?: boolean;
1553
- [key: string]: any;
1554
- }
1555
- interface RawEditorSettings extends BaseEditorSettings {
1556
- external_plugins?: Record<string, string>;
1557
- mobile?: RawEditorSettings;
1558
- plugins?: string | string[];
1559
- }
1560
- interface EditorSettings extends BaseEditorSettings {
1561
- external_plugins: Record<string, string>;
1562
- plugins: string;
1563
- }
1564
- interface ParamTypeMap {
1565
- 'hash': Record<string, string>;
1566
- 'string': string;
1567
- 'number': number;
1568
- 'boolean': boolean;
1569
- 'string[]': string[];
1570
- 'array': any[];
1571
- }
1572
- interface BlobInfoImagePair {
1573
- image: HTMLImageElement;
1574
- blobInfo: BlobInfo;
1575
- }
1576
- declare class NodeChange {
1577
- private readonly editor;
1578
- private lastPath;
1579
- constructor(editor: Editor);
1580
- nodeChanged(args?: any): void;
1581
- private isSameElementPath;
1582
- }
1583
- interface SelectionOverrides {
1584
- showCaret: (direction: number, node: Element, before: boolean, scrollIntoView?: boolean) => Range | null;
1585
- showBlockCaretContainer: (blockCaretContainer: Element) => void;
1586
- hideFakeCaret: () => void;
1587
- destroy: () => void;
1588
- }
1589
- interface Quirks {
1590
- refreshContentEditable(): void;
1591
- isHidden(): boolean;
1592
- }
1593
- declare type DecoratorData = Record<string, any>;
1594
- declare type Decorator = (uid: string, data: DecoratorData) => {
1595
- attributes?: {};
1596
- classes?: string[];
1597
- };
1598
- declare type AnnotationListener = (state: boolean, name: string, data?: {
1599
- uid: string;
1600
- nodes: any[];
1601
- }) => void;
1602
- declare type AnnotationListenerApi = AnnotationListener;
1603
- interface AnnotatorSettings {
1604
- decorate: Decorator;
1605
- persistent?: boolean;
1606
- }
1607
- interface Annotator {
1608
- register: (name: string, settings: AnnotatorSettings) => void;
1609
- annotate: (name: string, data: DecoratorData) => void;
1610
- annotationChanged: (name: string, f: AnnotationListenerApi) => void;
1611
- remove: (name: string) => void;
1612
- getAll: (name: string) => Record<string, Element[]>;
1613
- }
1614
- interface GeomRect {
1615
- readonly x: number;
1616
- readonly y: number;
1617
- readonly w: number;
1618
- readonly h: number;
1619
- }
1620
- interface Rect {
1621
- inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
1622
- relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
1623
- findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
1624
- intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
1625
- clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
1626
- create: (x: number, y: number, w: number, h: number) => GeomRect;
1627
- fromClientRect: (clientRect: DOMRect) => GeomRect;
1809
+ [key: string]: any;
1628
1810
  }
1629
- interface StyleMap {
1630
- [s: string]: string | number;
1811
+ interface RawEditorOptions extends BaseEditorOptions {
1812
+ external_plugins?: Record<string, string>;
1813
+ mobile?: RawEditorOptions;
1814
+ plugins?: string | string[];
1631
1815
  }
1816
+ interface NormalizedEditorOptions extends BaseEditorOptions {
1817
+ external_plugins: Record<string, string>;
1818
+ forced_plugins: string[];
1819
+ plugins: string[];
1820
+ }
1821
+ interface EditorOptions extends NormalizedEditorOptions {
1822
+ content_css: string[];
1823
+ contextmenu: string[];
1824
+ font_css: string[];
1825
+ forced_root_block: string;
1826
+ forced_root_block_attrs: Record<string, string>;
1827
+ noneditable_regexp: RegExp[];
1828
+ object_resizing?: string;
1829
+ preview_styles?: string;
1830
+ text_patterns?: Pattern[];
1831
+ }
1832
+ declare type StyleMap = Record<string, string | number>;
1632
1833
  interface StylesSettings {
1633
1834
  allow_script_urls?: boolean;
1634
1835
  allow_svg_data_urls?: boolean;
@@ -1636,17 +1837,46 @@ interface StylesSettings {
1636
1837
  url_converter_scope?: any;
1637
1838
  }
1638
1839
  interface Styles {
1639
- toHex: (color: string) => string;
1640
1840
  parse: (css: string) => Record<string, string>;
1641
1841
  serialize: (styles: StyleMap, elementName?: string) => string;
1642
1842
  }
1843
+ declare type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void;
1844
+ declare type EventUtilsEvent<T> = NormalizedEvent<T> & {
1845
+ metaKey: boolean;
1846
+ };
1847
+ interface EventUtilsConstructor {
1848
+ readonly prototype: EventUtils;
1849
+ new (): EventUtils;
1850
+ Event: EventUtils;
1851
+ }
1852
+ declare class EventUtils {
1853
+ static Event: EventUtils;
1854
+ domLoaded: boolean;
1855
+ events: Record<string, any>;
1856
+ private readonly expando;
1857
+ private hasFocusIn;
1858
+ private hasMouseEnterLeave;
1859
+ private mouseEnterLeave;
1860
+ private count;
1861
+ constructor();
1862
+ bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
1863
+ bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
1864
+ unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
1865
+ unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
1866
+ unbind(target: any): this;
1867
+ fire(target: any, name: string, args?: {}): this;
1868
+ dispatch(target: any, name: string, args?: {}): this;
1869
+ clean(target: any): this;
1870
+ destroy(): void;
1871
+ cancel<T = any>(e: EventUtilsEvent<T>): boolean;
1872
+ private executeHandlers;
1873
+ }
1643
1874
  interface DOMUtilsSettings {
1644
1875
  schema: Schema;
1645
1876
  url_converter: URLConverter;
1646
1877
  url_converter_scope: any;
1647
1878
  ownEvents: boolean;
1648
1879
  keep_values: boolean;
1649
- hex_colors: boolean;
1650
1880
  update_styles: boolean;
1651
1881
  root_element: HTMLElement;
1652
1882
  collect: Function;
@@ -1663,6 +1893,7 @@ declare type BoundEvent = [
1663
1893
  any
1664
1894
  ];
1665
1895
  declare type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
1896
+ declare type RunResult<T, R> = T extends Array<any> ? false | R[] : false | R;
1666
1897
  interface DOMUtils {
1667
1898
  doc: Document;
1668
1899
  settings: Partial<DOMUtilsSettings>;
@@ -1676,11 +1907,6 @@ interface DOMUtils {
1676
1907
  schema: Schema;
1677
1908
  events: EventUtils;
1678
1909
  root: Node;
1679
- $: DomQueryConstructor;
1680
- $$: {
1681
- <T extends Node>(elm: T | T[] | DomQuery<T>): DomQuery<T>;
1682
- (elm: string): DomQuery<Node>;
1683
- };
1684
1910
  isBlock: (node: string | Node) => boolean;
1685
1911
  clone: (node: Node, deep: boolean) => Node;
1686
1912
  getRoot: () => HTMLElement;
@@ -1715,12 +1941,9 @@ interface DOMUtils {
1715
1941
  };
1716
1942
  createHTML: (name: string, attrs?: Record<string, string>, html?: string) => string;
1717
1943
  createFragment: (html?: string) => DocumentFragment;
1718
- remove: <T extends Node>(node: string | T | T[] | DomQuery<T>, keepChildren?: boolean) => T | T[];
1719
- setStyle: {
1720
- (elm: string | Node | Node[], name: string, value: string | number | null): void;
1721
- (elm: string | Node | Node[], styles: StyleMap): void;
1722
- };
1723
- getStyle: (elm: string | Node, name: string, computed?: boolean) => string;
1944
+ remove: <T extends Node>(node: string | T | T[], keepChildren?: boolean) => RunResult<typeof node, T>;
1945
+ setStyle: (elm: string | Node | Node[], name: string, value: string | number | null) => void;
1946
+ getStyle: (elm: string | Node, name: string, computed?: boolean) => string | undefined;
1724
1947
  setStyles: (elm: string | Node | Node[], stylesArg: StyleMap) => void;
1725
1948
  removeAllAttribs: (e: RunArguments<Element>) => void;
1726
1949
  setAttrib: (elm: string | Node | Node[], name: string, value: string | boolean | number | null) => void;
@@ -1749,7 +1972,7 @@ interface DOMUtils {
1749
1972
  encode: (text: string) => string;
1750
1973
  insertAfter: {
1751
1974
  <T extends Node>(node: T | T[], reference: string | Node): T;
1752
- <T extends Node>(node: RunArguments<T>, reference: string | Node): false | T;
1975
+ <T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult<typeof node, T>;
1753
1976
  };
1754
1977
  replace: {
1755
1978
  <T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
@@ -1760,9 +1983,8 @@ interface DOMUtils {
1760
1983
  (elm: Element, name: string): Element;
1761
1984
  };
1762
1985
  findCommonAncestor: (a: Node, b: Node) => Node;
1763
- toHex: (rgbVal: string) => string;
1764
- run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): R;
1765
- run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): false | R;
1986
+ run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): typeof elm extends Array<any> ? R[] : R;
1987
+ run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): RunResult<typeof elm, R>;
1766
1988
  getAttribs: (elm: string | Node) => NamedNodeMap | Attr[];
1767
1989
  isEmpty: (node: Node, elements?: Record<string, any>) => boolean;
1768
1990
  createRng: () => Range;
@@ -1780,6 +2002,7 @@ interface DOMUtils {
1780
2002
  <K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
1781
2003
  };
1782
2004
  fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
2005
+ dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
1783
2006
  getContentEditable: (node: Node) => string | null;
1784
2007
  getContentEditableParent: (node: Node) => string | null;
1785
2008
  destroy: () => void;
@@ -1794,13 +2017,6 @@ interface ClientRect {
1794
2017
  width: number;
1795
2018
  height: number;
1796
2019
  }
1797
- interface GetSelectionContentArgs extends GetContentArgs {
1798
- selection?: boolean;
1799
- contextual?: boolean;
1800
- }
1801
- interface SelectionSetContentArgs extends SetContentArgs {
1802
- selection?: boolean;
1803
- }
1804
2020
  interface BookmarkManager {
1805
2021
  getBookmark: (type: number, normalized?: boolean) => Bookmark;
1806
2022
  moveToBookmark: (bookmark: Bookmark) => void;
@@ -1812,52 +2028,6 @@ interface ControlSelection {
1812
2028
  updateResizeRect: (evt: EditorEvent<any>) => void;
1813
2029
  destroy: () => void;
1814
2030
  }
1815
- interface ParserArgs {
1816
- getInner?: boolean | number;
1817
- forced_root_block?: boolean | string;
1818
- context?: string;
1819
- isRootContent?: boolean;
1820
- format?: string;
1821
- invalid?: boolean;
1822
- no_events?: boolean;
1823
- [key: string]: any;
1824
- }
1825
- declare type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
1826
- interface ParserFilter {
1827
- name: string;
1828
- callbacks: ParserFilterCallback[];
1829
- }
1830
- interface DomParserSettings {
1831
- allow_html_data_urls?: boolean;
1832
- allow_svg_data_urls?: boolean;
1833
- allow_conditional_comments?: boolean;
1834
- allow_html_in_named_anchor?: boolean;
1835
- allow_script_urls?: boolean;
1836
- allow_unsafe_link_target?: boolean;
1837
- convert_fonts_to_spans?: boolean;
1838
- fix_list_elements?: boolean;
1839
- font_size_legacy_values?: string;
1840
- forced_root_block?: boolean | string;
1841
- forced_root_block_attrs?: Record<string, string>;
1842
- padd_empty_with_br?: boolean;
1843
- preserve_cdata?: boolean;
1844
- remove_trailing_brs?: boolean;
1845
- root_name?: string;
1846
- validate?: boolean;
1847
- inline_styles?: boolean;
1848
- blob_cache?: BlobCache;
1849
- document?: Document;
1850
- images_dataimg_filter?: (img: HTMLImageElement) => boolean;
1851
- }
1852
- interface DomParser {
1853
- schema: Schema;
1854
- addAttributeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
1855
- getAttributeFilters: () => ParserFilter[];
1856
- addNodeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
1857
- getNodeFilters: () => ParserFilter[];
1858
- filterNode: (node: AstNode) => AstNode;
1859
- parse: (html: string, args?: ParserArgs) => AstNode;
1860
- }
1861
2031
  interface WriterSettings {
1862
2032
  element_format?: 'xhtml' | 'html';
1863
2033
  entities?: string;
@@ -1894,319 +2064,103 @@ interface DomSerializerSettings extends DomParserSettings, WriterSettings, Schem
1894
2064
  }
1895
2065
  interface DomSerializerImpl {
1896
2066
  schema: Schema;
1897
- addNodeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
1898
- addAttributeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
2067
+ addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
2068
+ addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
1899
2069
  getNodeFilters: () => ParserFilter[];
1900
2070
  getAttributeFilters: () => ParserFilter[];
2071
+ removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
2072
+ removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
1901
2073
  serialize: {
1902
2074
  (node: Element, parserArgs: {
1903
2075
  format: 'tree';
1904
2076
  } & ParserArgs): AstNode;
1905
2077
  (node: Element, parserArgs?: ParserArgs): string;
1906
2078
  };
1907
- addRules: (rules: string) => void;
1908
- setRules: (rules: string) => void;
1909
- addTempAttr: (name: string) => void;
1910
- getTempAttrs: () => string[];
1911
- }
1912
- interface DomSerializer extends DomSerializerImpl {
1913
- }
1914
- interface EditorSelection {
1915
- bookmarkManager: BookmarkManager;
1916
- controlSelection: ControlSelection;
1917
- dom: DOMUtils;
1918
- win: Window;
1919
- serializer: DomSerializer;
1920
- editor: Editor;
1921
- collapse: (toStart?: boolean) => void;
1922
- setCursorLocation: {
1923
- (node: Node, offset: number): void;
1924
- (): void;
1925
- };
1926
- getContent: {
1927
- (args: {
1928
- format: 'tree';
1929
- } & GetSelectionContentArgs): AstNode;
1930
- (args?: GetSelectionContentArgs): string;
1931
- };
1932
- setContent: (content: string, args?: SelectionSetContentArgs) => void;
1933
- getBookmark: (type?: number, normalized?: boolean) => Bookmark;
1934
- moveToBookmark: (bookmark: Bookmark) => void;
1935
- select: (node: Node, content?: boolean) => Node;
1936
- isCollapsed: () => boolean;
1937
- isForward: () => boolean;
1938
- setNode: (elm: Element) => Element;
1939
- getNode: () => Element;
1940
- getSel: () => Selection | null;
1941
- setRng: (rng: Range, forward?: boolean) => void;
1942
- getRng: () => Range;
1943
- getStart: (real?: boolean) => Element;
1944
- getEnd: (real?: boolean) => Element;
1945
- getSelectedBlocks: (startElm?: Element, endElm?: Element) => Element[];
1946
- normalize: () => Range;
1947
- selectorChanged: (selector: string, callback: (active: boolean, args: {
1948
- node: Node;
1949
- selector: String;
1950
- parents: Element[];
1951
- }) => void) => EditorSelection;
1952
- selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
1953
- node: Node;
1954
- selector: String;
1955
- parents: Element[];
1956
- }) => void) => {
1957
- unbind: () => void;
1958
- };
1959
- getScrollContainer: () => HTMLElement;
1960
- scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
1961
- placeCaretAt: (clientX: number, clientY: number) => void;
1962
- getBoundingClientRect: () => ClientRect | DOMRect;
1963
- destroy: () => void;
1964
- }
1965
- declare type EditorCommandCallback = (ui: boolean, value: any, args: any) => void;
1966
- declare type EditorCommandsCallback = (command: string, ui: boolean, value: any, args: any) => void;
1967
- interface Commands {
1968
- state: Record<string, (command: string) => boolean>;
1969
- exec: Record<string, EditorCommandsCallback>;
1970
- value: Record<string, (command: string) => string>;
1971
- }
1972
- interface EditorCommandsConstructor {
1973
- readonly prototype: EditorCommands;
1974
- new (editor: Editor): EditorCommands;
1975
- }
1976
- declare class EditorCommands {
1977
- private readonly editor;
1978
- private selectionBookmark;
1979
- private commands;
1980
- constructor(editor: Editor);
1981
- execCommand(command: string, ui?: boolean, value?: any, args?: any): boolean;
1982
- queryCommandState(command: string): boolean;
1983
- queryCommandValue(command: string): string;
1984
- addCommands<K extends keyof Commands>(commandList: Commands[K], type: K): void;
1985
- addCommands(commandList: Record<string, EditorCommandsCallback>): void;
1986
- addCommand(command: string, callback: EditorCommandCallback, scope?: any): void;
1987
- queryCommandSupported(command: string): boolean;
1988
- addQueryStateHandler(command: string, callback: () => boolean, scope?: any): void;
1989
- addQueryValueHandler(command: string, callback: () => string, scope?: any): void;
1990
- hasCustomCommand(command: string): boolean;
1991
- private execNativeCommand;
1992
- private isFormatMatch;
1993
- private toggleFormat;
1994
- private storeSelection;
1995
- private restoreSelection;
1996
- private setupCommands;
1997
- }
1998
- interface WindowParams {
1999
- readonly inline?: 'cursor' | 'toolbar';
2000
- readonly ariaAttrs?: boolean;
2001
- }
2002
- declare type InstanceApi<T> = UrlDialogInstanceApi | DialogInstanceApi<T>;
2003
- interface WindowManagerImpl {
2004
- open: <T>(config: DialogSpec<T>, params: WindowParams, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
2005
- openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
2006
- alert: (message: string, callback: () => void) => void;
2007
- confirm: (message: string, callback: (state: boolean) => void) => void;
2008
- close: (dialog: InstanceApi<any>) => void;
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
- }
2017
- interface ExecCommandEvent {
2018
- command: string;
2019
- ui?: boolean;
2020
- value?: any;
2021
- }
2022
- declare type GetContentEvent = GetContentArgs & {
2023
- source_view?: boolean;
2024
- selection?: boolean;
2025
- save?: boolean;
2026
- };
2027
- declare type SetContentEvent = SetContentArgs & {
2028
- source_view?: boolean;
2029
- paste?: boolean;
2030
- selection?: boolean;
2031
- };
2032
- interface NewBlockEvent {
2033
- newBlock: Element;
2034
- }
2035
- interface NodeChangeEvent {
2036
- element: Element;
2037
- parents: Node[];
2038
- selectionChange?: boolean;
2039
- initial?: boolean;
2040
- }
2041
- interface FormatEvent {
2042
- format: string;
2043
- vars?: FormatVars;
2044
- node?: Node | RangeLikeObject;
2045
- }
2046
- interface ObjectResizeEvent {
2047
- target: HTMLElement;
2048
- width: number;
2049
- height: number;
2050
- origin: string;
2051
- }
2052
- interface ObjectSelectedEvent {
2053
- target: Node;
2054
- targetClone?: Node;
2055
- }
2056
- interface ScrollIntoViewEvent {
2057
- elm: HTMLElement;
2058
- alignToTop: boolean;
2059
- }
2060
- interface SetSelectionRangeEvent {
2061
- range: Range;
2062
- forward: boolean;
2063
- }
2064
- interface ShowCaretEvent {
2065
- target: Node;
2066
- direction: number;
2067
- before: boolean;
2068
- }
2069
- interface SwitchModeEvent {
2070
- mode: string;
2071
- }
2072
- interface AddUndoEvent {
2073
- level: UndoLevel;
2074
- lastLevel: UndoLevel;
2075
- originalEvent: Event;
2076
- }
2077
- interface UndoRedoEvent {
2078
- level: UndoLevel;
2079
- }
2080
- interface WindowEvent<T extends DialogData> {
2081
- dialog: InstanceApi<T>;
2082
- }
2083
- interface ProgressStateEvent {
2084
- state: boolean;
2085
- time?: number;
2086
- }
2087
- interface AfterProgressStateEvent {
2088
- state: boolean;
2089
- }
2090
- interface PlaceholderToggleEvent {
2091
- state: boolean;
2092
- }
2093
- interface LoadErrorEvent {
2094
- message: string;
2095
- }
2096
- interface PreProcessEvent extends ParserArgs {
2097
- node: Element;
2079
+ addRules: (rules: string) => void;
2080
+ setRules: (rules: string) => void;
2081
+ addTempAttr: (name: string) => void;
2082
+ getTempAttrs: () => string[];
2098
2083
  }
2099
- interface PostProcessEvent extends ParserArgs {
2100
- content: string;
2084
+ interface DomSerializer extends DomSerializerImpl {
2101
2085
  }
2102
- interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
2103
- 'activate': {
2104
- relatedTarget: Editor;
2105
- };
2106
- 'deactivate': {
2107
- relatedTarget: Editor;
2108
- };
2109
- 'focus': {
2110
- blurredEditor: Editor;
2086
+ interface EditorSelection {
2087
+ bookmarkManager: BookmarkManager;
2088
+ controlSelection: ControlSelection;
2089
+ dom: DOMUtils;
2090
+ win: Window;
2091
+ serializer: DomSerializer;
2092
+ editor: Editor;
2093
+ collapse: (toStart?: boolean) => void;
2094
+ setCursorLocation: {
2095
+ (node: Node, offset: number): void;
2096
+ (): void;
2111
2097
  };
2112
- 'blur': {
2113
- focusedEditor: Editor;
2098
+ getContent: {
2099
+ (args: {
2100
+ format: 'tree';
2101
+ } & Partial<GetSelectionContentArgs>): AstNode;
2102
+ (args?: Partial<GetSelectionContentArgs>): string;
2114
2103
  };
2115
- 'resize': UIEvent;
2116
- 'scroll': UIEvent;
2117
- 'detach': {};
2118
- 'remove': {};
2119
- 'init': {};
2120
- 'ScrollIntoView': ScrollIntoViewEvent;
2121
- 'AfterScrollIntoView': ScrollIntoViewEvent;
2122
- 'ObjectResized': ObjectResizeEvent;
2123
- 'ObjectResizeStart': ObjectResizeEvent;
2124
- 'SwitchMode': SwitchModeEvent;
2125
- 'ScrollWindow': UIEvent;
2126
- 'ResizeWindow': UIEvent;
2127
- 'SkinLoaded': {};
2128
- 'SkinLoadError': LoadErrorEvent;
2129
- 'PluginLoadError': LoadErrorEvent;
2130
- 'IconsLoadError': LoadErrorEvent;
2131
- 'LanguageLoadError': LoadErrorEvent;
2132
- 'BeforeExecCommand': ExecCommandEvent;
2133
- 'ExecCommand': ExecCommandEvent;
2134
- 'NodeChange': NodeChangeEvent;
2135
- 'FormatApply': FormatEvent;
2136
- 'FormatRemove': FormatEvent;
2137
- 'ShowCaret': ShowCaretEvent;
2138
- 'SelectionChange': {};
2139
- 'ObjectSelected': ObjectSelectedEvent;
2140
- 'BeforeObjectSelected': ObjectSelectedEvent;
2141
- 'GetSelectionRange': {
2142
- range: Range;
2104
+ setContent: (content: string, args?: Partial<SetSelectionContentArgs>) => void;
2105
+ getBookmark: (type?: number, normalized?: boolean) => Bookmark;
2106
+ moveToBookmark: (bookmark: Bookmark) => void;
2107
+ select: (node: Node, content?: boolean) => Node;
2108
+ isCollapsed: () => boolean;
2109
+ isForward: () => boolean;
2110
+ setNode: (elm: Element) => Element;
2111
+ getNode: () => Element;
2112
+ getSel: () => Selection | null;
2113
+ setRng: (rng: Range, forward?: boolean) => void;
2114
+ getRng: () => Range;
2115
+ getStart: (real?: boolean) => Element;
2116
+ getEnd: (real?: boolean) => Element;
2117
+ getSelectedBlocks: (startElm?: Element, endElm?: Element) => Element[];
2118
+ normalize: () => Range;
2119
+ selectorChanged: (selector: string, callback: (active: boolean, args: {
2120
+ node: Node;
2121
+ selector: String;
2122
+ parents: Element[];
2123
+ }) => void) => EditorSelection;
2124
+ selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
2125
+ node: Node;
2126
+ selector: String;
2127
+ parents: Element[];
2128
+ }) => void) => {
2129
+ unbind: () => void;
2143
2130
  };
2144
- 'SetSelectionRange': SetSelectionRangeEvent;
2145
- 'AfterSetSelectionRange': SetSelectionRangeEvent;
2146
- 'BeforeGetContent': GetContentEvent;
2147
- 'GetContent': GetContentEvent;
2148
- 'BeforeSetContent': SetContentEvent;
2149
- 'SetContent': SetContentEvent;
2150
- 'LoadContent': {};
2151
- 'PreviewFormats': {};
2152
- 'AfterPreviewFormats': {};
2153
- 'ScriptsLoaded': {};
2154
- 'PreInit': {};
2155
- 'PostRender': {};
2156
- 'NewBlock': NewBlockEvent;
2157
- 'ClearUndos': {};
2158
- 'TypingUndo': {};
2159
- 'Redo': UndoRedoEvent;
2160
- 'Undo': UndoRedoEvent;
2161
- 'BeforeAddUndo': AddUndoEvent;
2162
- 'AddUndo': AddUndoEvent;
2163
- 'CloseWindow': WindowEvent<any>;
2164
- 'OpenWindow': WindowEvent<any>;
2165
- 'ProgressState': ProgressStateEvent;
2166
- 'AfterProgressState': AfterProgressStateEvent;
2167
- 'PlaceholderToggle': PlaceholderToggleEvent;
2168
- 'tap': TouchEvent;
2169
- 'longpress': TouchEvent;
2170
- 'longpresscancel': {};
2171
- 'PreProcess': PreProcessEvent;
2172
- 'PostProcess': PostProcessEvent;
2131
+ getScrollContainer: () => HTMLElement;
2132
+ scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
2133
+ placeCaretAt: (clientX: number, clientY: number) => void;
2134
+ getBoundingClientRect: () => ClientRect | DOMRect;
2135
+ destroy: () => void;
2173
2136
  }
2174
- interface EditorManagerEventMap {
2175
- 'AddEditor': {
2176
- editor: Editor;
2177
- };
2178
- 'RemoveEditor': {
2179
- editor: Editor;
2180
- };
2181
- 'BeforeUnload': {
2182
- returnValue: any;
2183
- };
2137
+ declare type EditorCommandCallback = (ui: boolean, value: any) => void;
2138
+ declare type EditorCommandsCallback = (command: string, ui: boolean, value: any) => void;
2139
+ interface Commands {
2140
+ state: Record<string, (command: string) => boolean>;
2141
+ exec: Record<string, EditorCommandsCallback>;
2142
+ value: Record<string, (command: string) => string>;
2184
2143
  }
2185
- type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
2186
- type EventTypes_d_GetContentEvent = GetContentEvent;
2187
- type EventTypes_d_SetContentEvent = SetContentEvent;
2188
- type EventTypes_d_NewBlockEvent = NewBlockEvent;
2189
- type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
2190
- type EventTypes_d_FormatEvent = FormatEvent;
2191
- type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
2192
- type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
2193
- type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
2194
- type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
2195
- type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
2196
- type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
2197
- type EventTypes_d_AddUndoEvent = AddUndoEvent;
2198
- type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
2199
- type EventTypes_d_WindowEvent<_0> = WindowEvent<_0>;
2200
- type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
2201
- type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
2202
- type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
2203
- type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
2204
- type EventTypes_d_PreProcessEvent = PreProcessEvent;
2205
- type EventTypes_d_PostProcessEvent = PostProcessEvent;
2206
- type EventTypes_d_EditorEventMap = EditorEventMap;
2207
- type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
2208
- declare namespace EventTypes_d {
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, };
2144
+ interface ExecCommandArgs {
2145
+ skip_focus?: boolean;
2146
+ }
2147
+ interface EditorCommandsConstructor {
2148
+ readonly prototype: EditorCommands;
2149
+ new (editor: Editor): EditorCommands;
2150
+ }
2151
+ declare class EditorCommands {
2152
+ private readonly editor;
2153
+ private commands;
2154
+ constructor(editor: Editor);
2155
+ execCommand(command: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
2156
+ queryCommandState(command: string): boolean;
2157
+ queryCommandValue(command: string): string;
2158
+ addCommands<K extends keyof Commands>(commandList: Commands[K], type: K): void;
2159
+ addCommands(commandList: Record<string, EditorCommandsCallback>): void;
2160
+ addCommand(command: string, callback: EditorCommandCallback, scope?: any): void;
2161
+ queryCommandSupported(command: string): boolean;
2162
+ addQueryStateHandler(command: string, callback: () => boolean, scope?: any): void;
2163
+ addQueryValueHandler(command: string, callback: () => string, scope?: any): void;
2210
2164
  }
2211
2165
  interface RawString {
2212
2166
  raw: string;
@@ -2229,6 +2183,7 @@ interface I18n {
2229
2183
  }
2230
2184
  interface Observable<T> {
2231
2185
  fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
2186
+ dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
2232
2187
  on<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): EventDispatcher<T>;
2233
2188
  off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
2234
2189
  once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
@@ -2293,15 +2248,12 @@ declare class URI {
2293
2248
  getURI(noProtoHost?: boolean): string;
2294
2249
  }
2295
2250
  interface EditorManager extends Observable<EditorManagerEventMap> {
2296
- $: DomQueryConstructor;
2297
- defaultSettings: RawEditorSettings;
2251
+ defaultOptions: RawEditorOptions;
2298
2252
  majorVersion: string;
2299
2253
  minorVersion: string;
2300
2254
  releaseDate: string;
2301
- editors: Editor[];
2302
2255
  activeEditor: Editor;
2303
2256
  focusedEditor: Editor;
2304
- settings: RawEditorSettings;
2305
2257
  baseURI: URI;
2306
2258
  baseURL: string;
2307
2259
  documentBaseURL: string;
@@ -2309,12 +2261,12 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
2309
2261
  suffix: string;
2310
2262
  add(this: EditorManager, editor: Editor): Editor;
2311
2263
  addI18n: (code: string, item: Record<string, string>) => void;
2312
- createEditor(this: EditorManager, id: string, settings: RawEditorSettings): Editor;
2264
+ createEditor(this: EditorManager, id: string, options: RawEditorOptions): Editor;
2313
2265
  execCommand(this: EditorManager, cmd: string, ui: boolean, value: any): boolean;
2314
2266
  get(this: EditorManager): Editor[];
2315
2267
  get(this: EditorManager, id: number | string): Editor;
2316
- init(this: EditorManager, settings: RawEditorSettings): Promise<Editor[]>;
2317
- overrideDefaults(this: EditorManager, defaultSettings: Partial<RawEditorSettings>): void;
2268
+ init(this: EditorManager, options: RawEditorOptions): Promise<Editor[]>;
2269
+ overrideDefaults(this: EditorManager, defaultOptions: Partial<RawEditorOptions>): void;
2318
2270
  remove(this: EditorManager): void;
2319
2271
  remove(this: EditorManager, selector: string | Editor): Editor | void;
2320
2272
  setActive(this: EditorManager, editor: Editor): void;
@@ -2328,18 +2280,73 @@ interface EditorObservable extends Observable<EditorEventMap> {
2328
2280
  toggleNativeEvent(this: Editor, name: string, state: boolean): any;
2329
2281
  unbindAllNativeEvents(this: Editor): void;
2330
2282
  }
2283
+ interface ProcessorSuccess<T> {
2284
+ valid: true;
2285
+ value: T;
2286
+ }
2287
+ interface ProcessorError {
2288
+ valid: false;
2289
+ message: string;
2290
+ }
2291
+ declare type SimpleProcessor = (value: unknown) => boolean;
2292
+ declare type Processor<T> = (value: unknown) => ProcessorSuccess<T> | ProcessorError;
2293
+ interface BuiltInOptionTypeMap {
2294
+ 'string': string;
2295
+ 'number': number;
2296
+ 'boolean': boolean;
2297
+ 'array': any[];
2298
+ 'function': Function;
2299
+ 'object': any;
2300
+ 'string[]': string[];
2301
+ 'object[]': any[];
2302
+ 'regexp': RegExp;
2303
+ }
2304
+ declare type BuiltInOptionType = keyof BuiltInOptionTypeMap;
2305
+ interface BaseOptionSpec {
2306
+ immutable?: boolean;
2307
+ deprecated?: boolean;
2308
+ docsUrl?: string;
2309
+ }
2310
+ interface BuiltInOptionSpec<K extends BuiltInOptionType> extends BaseOptionSpec {
2311
+ processor: K;
2312
+ default?: BuiltInOptionTypeMap[K];
2313
+ }
2314
+ interface SimpleOptionSpec<T> extends BaseOptionSpec {
2315
+ processor: SimpleProcessor;
2316
+ default?: T;
2317
+ }
2318
+ interface OptionSpec<T, U> extends BaseOptionSpec {
2319
+ processor: Processor<U>;
2320
+ default?: T;
2321
+ }
2322
+ interface Options {
2323
+ register: {
2324
+ <K extends BuiltInOptionType>(name: string, spec: BuiltInOptionSpec<K>): void;
2325
+ <K extends keyof NormalizedEditorOptions>(name: K, spec: OptionSpec<NormalizedEditorOptions[K], EditorOptions[K]> | SimpleOptionSpec<NormalizedEditorOptions[K]>): void;
2326
+ <T, U>(name: string, spec: OptionSpec<T, U>): void;
2327
+ <T>(name: string, spec: SimpleOptionSpec<T>): void;
2328
+ };
2329
+ isRegistered: (name: string) => boolean;
2330
+ get: {
2331
+ <K extends keyof EditorOptions>(name: K): EditorOptions[K] | undefined;
2332
+ <T>(name: string): T | undefined;
2333
+ };
2334
+ set: <K extends string, T>(name: K, value: K extends keyof NormalizedEditorOptions ? NormalizedEditorOptions[K] : T) => boolean;
2335
+ unset: (name: string) => boolean;
2336
+ isSet: (name: string) => boolean;
2337
+ }
2331
2338
  interface UploadResult$1 {
2332
2339
  element: HTMLImageElement;
2333
2340
  status: boolean;
2334
2341
  blobInfo: BlobInfo;
2335
2342
  uploadUri: string;
2343
+ removed: boolean;
2336
2344
  }
2337
- declare type UploadCallback = (results: UploadResult$1[]) => void;
2338
2345
  interface EditorUpload {
2339
2346
  blobCache: BlobCache;
2340
2347
  addFilter: (filter: (img: HTMLImageElement) => boolean) => void;
2341
- uploadImages: (callback?: UploadCallback) => Promise<UploadResult$1[]>;
2342
- uploadImagesAuto: (callback?: UploadCallback) => void | Promise<UploadResult$1[]>;
2348
+ uploadImages: () => Promise<UploadResult$1[]>;
2349
+ uploadImagesAuto: () => Promise<UploadResult$1[]>;
2343
2350
  scanForImages: () => Promise<BlobInfoImagePair[]>;
2344
2351
  destroy: () => void;
2345
2352
  }
@@ -2382,14 +2389,22 @@ interface EditorModeApi {
2382
2389
  deactivate: () => void;
2383
2390
  editorReadOnly: boolean;
2384
2391
  }
2392
+ interface Model {
2393
+ readonly table: {
2394
+ readonly getSelectedCells: () => HTMLTableCellElement[];
2395
+ readonly clearSelectedCells: (container: Node) => void;
2396
+ };
2397
+ }
2398
+ declare type ModelManager = AddOnManager<Model>;
2385
2399
  interface Plugin {
2386
2400
  getMetadata?: () => {
2387
2401
  name: string;
2388
2402
  url: string;
2389
2403
  };
2404
+ init?: (editor: Editor, url: string) => void;
2390
2405
  [key: string]: any;
2391
2406
  }
2392
- declare type PluginManager = AddOnManager<Plugin>;
2407
+ declare type PluginManager = AddOnManager<void | Plugin>;
2393
2408
  interface ShortcutsConstructor {
2394
2409
  readonly prototype: Shortcuts;
2395
2410
  new (editor: Editor): Shortcuts;
@@ -2418,7 +2433,7 @@ interface Theme {
2418
2433
  inline?: any;
2419
2434
  execCommand?: (command: string, ui?: boolean, value?: any) => boolean;
2420
2435
  destroy?: () => void;
2421
- init?: (editor: Editor, url: string, $: DomQueryConstructor) => void;
2436
+ init?: (editor: Editor, url: string) => void;
2422
2437
  renderUI?: () => {
2423
2438
  iframeContainer?: HTMLIFrameElement;
2424
2439
  editorContainer: HTMLElement;
@@ -2427,15 +2442,14 @@ interface Theme {
2427
2442
  getNotificationManagerImpl?: () => NotificationManagerImpl;
2428
2443
  getWindowManagerImpl?: () => WindowManagerImpl;
2429
2444
  }
2430
- declare type ThemeManager = AddOnManager<Theme>;
2445
+ declare type ThemeManager = AddOnManager<void | Theme>;
2431
2446
  interface EditorConstructor {
2432
2447
  readonly prototype: Editor;
2433
- new (id: string, settings: RawEditorSettings, editorManager: EditorManager): Editor;
2448
+ new (id: string, options: RawEditorOptions, editorManager: EditorManager): Editor;
2434
2449
  }
2435
2450
  declare class Editor implements EditorObservable {
2436
2451
  documentBaseUrl: string;
2437
2452
  baseUri: URI;
2438
- settings: EditorSettings;
2439
2453
  id: string;
2440
2454
  plugins: Record<string, Plugin>;
2441
2455
  documentBaseURI: URI;
@@ -2444,8 +2458,7 @@ declare class Editor implements EditorObservable {
2444
2458
  contentStyles: string[];
2445
2459
  ui: EditorUi;
2446
2460
  mode: EditorMode;
2447
- setMode: (mode: string) => void;
2448
- $: DomQueryConstructor;
2461
+ options: Options;
2449
2462
  shortcuts: Shortcuts;
2450
2463
  loadedCSS: Record<string, any>;
2451
2464
  editorCommands: EditorCommands;
@@ -2453,9 +2466,6 @@ declare class Editor implements EditorObservable {
2453
2466
  editorManager: EditorManager;
2454
2467
  inline: boolean;
2455
2468
  isNotDirty: boolean;
2456
- callbackLookup: any;
2457
- _nodeChangeDispatcher: NodeChange;
2458
- editorUpload: EditorUpload;
2459
2469
  annotator: Annotator;
2460
2470
  bodyElement: HTMLElement;
2461
2471
  bookmark: any;
@@ -2468,6 +2478,7 @@ declare class Editor implements EditorObservable {
2468
2478
  destroyed: boolean;
2469
2479
  dom: DOMUtils;
2470
2480
  editorContainer: HTMLElement;
2481
+ editorUpload: EditorUpload;
2471
2482
  eventRoot?: Element;
2472
2483
  formatter: Formatter;
2473
2484
  formElement: HTMLElement;
@@ -2491,12 +2502,12 @@ declare class Editor implements EditorObservable {
2491
2502
  startContent: string;
2492
2503
  targetElm: HTMLElement;
2493
2504
  theme: Theme;
2505
+ model: Model;
2494
2506
  undoManager: UndoManager;
2495
- validate: boolean;
2496
2507
  windowManager: WindowManager;
2497
2508
  _beforeUnload: () => void;
2498
2509
  _eventDispatcher: EventDispatcher<NativeEventMap>;
2499
- _mceOldSubmit: any;
2510
+ _nodeChangeDispatcher: NodeChange;
2500
2511
  _pendingNativeEvents: string[];
2501
2512
  _selectionOverrides: SelectionOverrides;
2502
2513
  _skinLoaded: boolean;
@@ -2504,19 +2515,19 @@ declare class Editor implements EditorObservable {
2504
2515
  toggleNativeEvent: EditorObservable['toggleNativeEvent'];
2505
2516
  unbindAllNativeEvents: EditorObservable['unbindAllNativeEvents'];
2506
2517
  fire: EditorObservable['fire'];
2518
+ dispatch: EditorObservable['dispatch'];
2507
2519
  on: EditorObservable['on'];
2508
2520
  off: EditorObservable['off'];
2509
2521
  once: EditorObservable['once'];
2510
2522
  hasEventListeners: EditorObservable['hasEventListeners'];
2511
- constructor(id: string, settings: RawEditorSettings, editorManager: EditorManager);
2523
+ constructor(id: string, options: RawEditorOptions, editorManager: EditorManager);
2512
2524
  render(): void;
2513
2525
  focus(skipFocus?: boolean): void;
2514
2526
  hasFocus(): boolean;
2515
- execCallback(name: string, ...x: any[]): any;
2516
2527
  translate(text: Untranslated): TranslatedString;
2517
- getParam<K extends keyof ParamTypeMap>(name: string, defaultVal: ParamTypeMap[K], type: K): ParamTypeMap[K];
2518
- getParam<K extends keyof EditorSettings>(name: K, defaultVal?: EditorSettings[K], type?: string): EditorSettings[K];
2519
- getParam<T>(name: string, defaultVal: T, type?: string): T;
2528
+ getParam<K extends BuiltInOptionType>(name: string, defaultVal: BuiltInOptionTypeMap[K], type: K): BuiltInOptionTypeMap[K];
2529
+ getParam<K extends keyof NormalizedEditorOptions>(name: K, defaultVal?: NormalizedEditorOptions[K], type?: BuiltInOptionType): NormalizedEditorOptions[K];
2530
+ getParam<T>(name: string, defaultVal: T, type?: BuiltInOptionType): T;
2520
2531
  hasPlugin(name: string, loaded?: boolean): boolean;
2521
2532
  nodeChanged(args?: any): void;
2522
2533
  addCommand(name: string, callback: EditorCommandCallback, scope?: object): void;
@@ -2527,7 +2538,7 @@ declare class Editor implements EditorObservable {
2527
2538
  boolean,
2528
2539
  any
2529
2540
  ] | (() => void), scope?: any): void;
2530
- execCommand(cmd: string, ui?: boolean, value?: any, args?: any): boolean;
2541
+ execCommand(cmd: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
2531
2542
  queryCommandState(cmd: string): boolean;
2532
2543
  queryCommandValue(cmd: string): string;
2533
2544
  queryCommandSupported(cmd: string): boolean;
@@ -2537,13 +2548,13 @@ declare class Editor implements EditorObservable {
2537
2548
  setProgressState(state: boolean, time?: number): void;
2538
2549
  load(args?: any): string;
2539
2550
  save(args?: any): string;
2540
- setContent(content: string, args?: SetContentArgs): string;
2541
- setContent(content: AstNode, args?: SetContentArgs): AstNode;
2542
- setContent(content: Content, args?: SetContentArgs): Content;
2551
+ setContent(content: string, args?: Partial<SetContentArgs>): string;
2552
+ setContent(content: AstNode, args?: Partial<SetContentArgs>): AstNode;
2553
+ setContent(content: Content, args?: Partial<SetContentArgs>): Content;
2543
2554
  getContent(args: {
2544
2555
  format: 'tree';
2545
- } & GetContentArgs): AstNode;
2546
- getContent(args?: GetContentArgs): string;
2556
+ } & Partial<GetContentArgs>): AstNode;
2557
+ getContent(args?: Partial<GetContentArgs>): string;
2547
2558
  insertContent(content: string, args?: any): void;
2548
2559
  resetContent(initialContent?: string): void;
2549
2560
  isDirty(): boolean;
@@ -2558,12 +2569,8 @@ declare class Editor implements EditorObservable {
2558
2569
  addVisual(elm?: HTMLElement): void;
2559
2570
  remove(): void;
2560
2571
  destroy(automatic?: boolean): void;
2561
- uploadImages(callback?: UploadCallback): Promise<UploadResult$1[]>;
2572
+ uploadImages(): Promise<UploadResult$1[]>;
2562
2573
  _scanForImages(): Promise<BlobInfoImagePair[]>;
2563
- addButton(): void;
2564
- addSidebar(): void;
2565
- addMenuItem(): void;
2566
- addContextToolbar(): void;
2567
2574
  }
2568
2575
  interface UrlObject {
2569
2576
  prefix: string;
@@ -2571,29 +2578,20 @@ interface UrlObject {
2571
2578
  suffix: string;
2572
2579
  }
2573
2580
  declare type WaitState = 'added' | 'loaded';
2574
- declare type AddOnCallback<T> = (editor: Editor, url: string, $?: DomQueryConstructor) => void | T;
2575
- declare type AddOnConstructor<T> = new (editor: Editor, url: string, $?: DomQueryConstructor) => T;
2581
+ declare type AddOnConstructor<T> = (editor: Editor, url: string) => T;
2576
2582
  interface AddOnManager<T> {
2577
2583
  items: AddOnConstructor<T>[];
2578
2584
  urls: Record<string, string>;
2579
2585
  lookup: Record<string, {
2580
2586
  instance: AddOnConstructor<T>;
2581
- dependencies?: string[];
2582
2587
  }>;
2583
- _listeners: {
2584
- name: string;
2585
- state: WaitState;
2586
- callback: () => void;
2587
- }[];
2588
2588
  get: (name: string) => AddOnConstructor<T>;
2589
- dependencies: (name: string) => string[];
2590
2589
  requireLangPack: (name: string, languages: string) => void;
2591
- add: (id: string, addOn: AddOnCallback<T>, dependencies?: string[]) => AddOnConstructor<T>;
2590
+ add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
2592
2591
  remove: (name: string) => void;
2593
2592
  createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
2594
- addComponents: (pluginName: string, scripts: string[]) => void;
2595
- load: (name: string, addOnUrl: string | UrlObject, success?: () => void, scope?: any, failure?: () => void) => void;
2596
- waitFor: (name: string, callback: () => void, state?: WaitState) => void;
2593
+ load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
2594
+ waitFor: (name: string, state?: WaitState) => Promise<void>;
2597
2595
  }
2598
2596
  interface RangeUtils {
2599
2597
  walk: (rng: Range, callback: (nodes: Node[]) => void) => void;
@@ -2618,14 +2616,14 @@ declare class ScriptLoader {
2618
2616
  private loading;
2619
2617
  constructor(settings?: ScriptLoaderSettings);
2620
2618
  _setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
2621
- loadScript(url: string, success?: () => void, failure?: () => void): void;
2619
+ loadScript(url: string): Promise<void>;
2622
2620
  isDone(url: string): boolean;
2623
2621
  markDone(url: string): void;
2624
- add(url: string, success?: () => void, scope?: any, failure?: () => void): void;
2625
- load(url: string, success?: () => void, scope?: any, failure?: () => void): void;
2622
+ add(url: string): Promise<void>;
2623
+ load(url: string): Promise<void>;
2626
2624
  remove(url: string): void;
2627
- loadQueue(success?: () => void, scope?: any, failure?: (urls: string[]) => void): void;
2628
- loadScripts(scripts: string[], success?: () => void, scope?: any, failure?: (urls: string[]) => void): void;
2625
+ loadQueue(): Promise<void>;
2626
+ loadScripts(scripts: string[]): Promise<void>;
2629
2627
  }
2630
2628
  declare type TextProcessCallback = (node: Text, offset: number, text: string) => number;
2631
2629
  interface Spot {
@@ -2644,10 +2642,10 @@ declare class DomTreeWalker {
2644
2642
  private readonly rootNode;
2645
2643
  private node;
2646
2644
  constructor(startNode: Node, rootNode: Node);
2647
- current(): Node;
2648
- next(shallow?: boolean): Node;
2649
- prev(shallow?: boolean): Node;
2650
- prev2(shallow?: boolean): Node;
2645
+ current(): Node | undefined;
2646
+ next(shallow?: boolean): Node | undefined;
2647
+ prev(shallow?: boolean): Node | undefined;
2648
+ prev2(shallow?: boolean): Node | undefined;
2651
2649
  private findSibling;
2652
2650
  private findPreviousNode;
2653
2651
  }
@@ -2656,31 +2654,17 @@ interface Version {
2656
2654
  minor: number;
2657
2655
  }
2658
2656
  interface Env {
2659
- opera: boolean;
2660
- webkit: boolean;
2661
- ie: false | number;
2662
- gecko: boolean;
2663
- mac: boolean;
2664
- iOS: boolean;
2665
- android: boolean;
2666
- contentEditable: boolean;
2667
2657
  transparentSrc: string;
2668
- caretAfter: boolean;
2669
- range: boolean;
2670
2658
  documentMode: number;
2671
- fileApi: boolean;
2672
- ceFalse: boolean;
2673
2659
  cacheSuffix: any;
2674
2660
  container: any;
2675
- experimentalShadowDom: boolean;
2676
2661
  canHaveCSP: boolean;
2677
- desktop: boolean;
2678
2662
  windowsPhone: boolean;
2679
2663
  browser: {
2680
2664
  current: string | undefined;
2681
2665
  version: Version;
2682
2666
  isEdge: () => boolean;
2683
- isChrome: () => boolean;
2667
+ isChromium: () => boolean;
2684
2668
  isIE: () => boolean;
2685
2669
  isOpera: () => boolean;
2686
2670
  isFirefox: () => boolean;
@@ -2692,7 +2676,7 @@ interface Env {
2692
2676
  isWindows: () => boolean;
2693
2677
  isiOS: () => boolean;
2694
2678
  isAndroid: () => boolean;
2695
- isOSX: () => boolean;
2679
+ isMacOS: () => boolean;
2696
2680
  isLinux: () => boolean;
2697
2681
  isSolaris: () => boolean;
2698
2682
  isFreeBSD: () => boolean;
@@ -2708,6 +2692,17 @@ interface Env {
2708
2692
  isDesktop: () => boolean;
2709
2693
  };
2710
2694
  }
2695
+ interface FakeClipboardItem {
2696
+ readonly items: Record<string, any>;
2697
+ readonly types: ReadonlyArray<string>;
2698
+ readonly getType: <D = any>(type: string) => D | undefined;
2699
+ }
2700
+ interface FakeClipboard {
2701
+ readonly FakeClipboardItem: (items: Record<string, any>) => FakeClipboardItem;
2702
+ readonly write: (data: FakeClipboardItem[]) => void;
2703
+ readonly read: () => FakeClipboardItem[] | undefined;
2704
+ readonly clear: () => void;
2705
+ }
2711
2706
  interface FocusManager {
2712
2707
  isEditorUIElement: (elm: Element) => boolean;
2713
2708
  }
@@ -2722,35 +2717,6 @@ interface Entities {
2722
2717
  getEncodeFunc: (name: string, entities?: EntitiesMap | string) => (text: string, attr?: boolean) => string;
2723
2718
  decode: (text: string) => string;
2724
2719
  }
2725
- declare type AttrList = Array<{
2726
- name: string;
2727
- value: string;
2728
- }> & {
2729
- map: Record<string, string>;
2730
- };
2731
- interface SaxParserSettings {
2732
- allow_conditional_comments?: boolean;
2733
- allow_html_data_urls?: boolean;
2734
- allow_script_urls?: boolean;
2735
- allow_svg_data_urls?: boolean;
2736
- fix_self_closing?: boolean;
2737
- preserve_cdata?: boolean;
2738
- remove_internals?: boolean;
2739
- self_closing_elements?: Record<string, {}>;
2740
- validate?: boolean;
2741
- document?: Document;
2742
- cdata?: (text: string) => void;
2743
- comment?: (text: string) => void;
2744
- doctype?: (text: string) => void;
2745
- end?: (name: string) => void;
2746
- pi?: (name: string, text: string) => void;
2747
- start?: (name: string, attrs: AttrList, empty: boolean) => void;
2748
- text?: (text: string, raw?: boolean) => void;
2749
- }
2750
- declare type ParserFormat = 'html' | 'xhtml' | 'xml';
2751
- interface SaxParser {
2752
- parse: (html: string, format?: ParserFormat) => void;
2753
- }
2754
2720
  interface IconPack {
2755
2721
  icons: Record<string, string>;
2756
2722
  }
@@ -2762,104 +2728,45 @@ interface IconManager {
2762
2728
  interface Resource {
2763
2729
  load: <T = any>(id: string, url: string) => Promise<T>;
2764
2730
  add: (id: string, data: any) => void;
2765
- }
2766
- declare type WithSubItems<T, K extends keyof T> = T[K] extends Array<any> ? (T & T[K][number]) : T;
2767
- interface Props<A extends any[] = any[]> {
2768
- Mixins?: Array<Record<string, any>>;
2769
- Methods?: string;
2770
- Properties?: string;
2771
- Statics?: Record<string, any>;
2772
- Defaults?: Record<string, any>;
2773
- init?: (...args: A) => void;
2774
- }
2775
- declare type ExtendedClass<T extends Props<A>, A extends any[]> = WithSubItems<T, 'Mixins'>;
2776
- interface ExtendedClassConstructor<T extends Props<A>, A extends any[] = any[]> extends Class {
2777
- readonly prototype: ExtendedClass<T, A>;
2778
- new (...args: A): ExtendedClass<T, A>;
2779
- [key: string]: T['Statics'];
2780
- }
2781
- interface Class {
2782
- extend<T extends Props<A>, A extends any[] = any[]>(props: T): ExtendedClassConstructor<T, A>;
2783
- }
2784
- interface RGB {
2785
- r: number;
2786
- g: number;
2787
- b: number;
2788
- }
2789
- interface HSV {
2790
- h: number;
2791
- s: number;
2792
- v: number;
2793
- }
2794
- declare type ColorConstructor = new (value?: string | RGB | HSV) => Color;
2795
- interface Color {
2796
- toRgb: () => RGB;
2797
- toHsv: () => HSV;
2798
- toHex: () => string;
2799
- parse: (value: string | RGB | HSV) => Color;
2800
- }
2801
- interface DebounceFunc<T extends (...args: any[]) => void> {
2802
- (...args: Parameters<T>): void;
2803
- stop: () => void;
2731
+ unload: (id: string) => void;
2804
2732
  }
2805
2733
  interface Delay {
2806
- requestAnimationFrame: (callback: () => void, element?: HTMLElement) => void;
2807
2734
  setEditorInterval: (editor: Editor, callback: () => void, time?: number) => number;
2808
2735
  setEditorTimeout: (editor: Editor, callback: () => void, time?: number) => number;
2809
- setInterval: (callback: () => void, time?: number) => number;
2810
- setTimeout: (callback: () => void, time?: number) => number;
2811
- clearInterval: (id?: number) => void;
2812
- clearTimeout: (id?: number) => void;
2813
- debounce: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
2814
- throttle: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
2815
2736
  }
2816
2737
  declare type UploadResult = UploadResult$2;
2817
2738
  interface ImageUploader {
2818
2739
  upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult[]>;
2819
2740
  }
2820
- interface JSONUtils {
2821
- serialize: (obj: any) => string;
2822
- parse: (text: string) => any;
2823
- }
2824
- interface JSONPSettings {
2825
- count?: number;
2826
- url: string;
2827
- callback: (json: string) => void;
2828
- }
2829
- interface JSONP {
2830
- callbacks: {};
2831
- count: number;
2832
- send(this: JSONP, settings: JSONPSettings): void;
2833
- }
2834
- interface JSONRequestSettings {
2835
- crossDomain?: boolean;
2836
- requestheaders?: Record<string, {
2837
- key: string;
2838
- value: string;
2839
- }>;
2840
- type?: string;
2841
- url?: string;
2842
- error_scope?: any;
2843
- success_scope?: any;
2844
- success?: (data: any) => void;
2845
- error?: (error: any, xhr: XMLHttpRequest) => void;
2846
- }
2847
- interface JSONRequestArgs extends JSONRequestSettings {
2848
- id?: string;
2849
- method?: string;
2850
- params?: string;
2851
- }
2852
- interface JSONRequestConstructor {
2853
- readonly prototype: JSONRequest;
2854
- new (settings?: JSONRequestSettings): JSONRequest;
2855
- sendRPC: (o: JSONRequestArgs) => void;
2856
- }
2857
- declare class JSONRequest {
2858
- static sendRPC(o: JSONRequestArgs): void;
2859
- settings: JSONRequestSettings;
2860
- count: number;
2861
- constructor(settings?: JSONRequestSettings);
2862
- send(args: JSONRequestArgs): void;
2741
+ declare type ArrayCallback$1<T, R> = (x: T, i: number, xs: ReadonlyArray<T>) => R;
2742
+ declare type ObjCallback$1<T, R> = (value: T, key: string, obj: Record<string, T>) => R;
2743
+ declare type ArrayCallback<T, R> = ArrayCallback$1<T, R>;
2744
+ declare type ObjCallback<T, R> = ObjCallback$1<T, R>;
2745
+ interface Tools {
2746
+ is: (obj: any, type: string) => boolean;
2747
+ isArray: <T>(arr: any) => arr is Array<T>;
2748
+ inArray: <T>(arr: ArrayLike<T>, value: T) => number;
2749
+ grep: {
2750
+ <T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback<T, boolean>): T[];
2751
+ <T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback<T, boolean>): T[];
2752
+ };
2753
+ trim: (str: string | null | undefined) => string;
2754
+ toArray: <T>(obj: ArrayLike<T>) => T[];
2755
+ hasOwn: (obj: any, name: string) => boolean;
2756
+ makeMap: <T>(items: ArrayLike<T> | string, delim?: string | RegExp, map?: Record<string, T | string>) => Record<string, T | string>;
2757
+ each: {
2758
+ <T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, void | boolean>, scope?: any): boolean;
2759
+ <T>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, void | boolean>, scope?: any): boolean;
2760
+ };
2761
+ map: {
2762
+ <T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
2763
+ <T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
2764
+ };
2765
+ extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
2766
+ walk: <T = any>(obj: T, f: Function, n?: keyof T, scope?: any) => void;
2767
+ resolve: (path: string, o?: Object) => any;
2768
+ explode: (s: string, d?: string | RegExp) => string[];
2769
+ _addCacheSuffix: (url: string) => string;
2863
2770
  }
2864
2771
  interface KeyboardLikeEvent {
2865
2772
  shiftKey: boolean;
@@ -2885,130 +2792,90 @@ interface VK {
2885
2792
  modifierPressed: (e: KeyboardLikeEvent) => boolean;
2886
2793
  metaKeyPressed: (e: KeyboardLikeEvent) => boolean;
2887
2794
  }
2888
- interface XHRSettings {
2889
- async?: boolean;
2890
- content_type?: string;
2891
- crossDomain?: boolean;
2892
- data?: Document | BodyInit;
2893
- requestheaders?: Record<string, {
2894
- key: string;
2895
- value: string;
2896
- }>;
2897
- scope?: any;
2898
- type?: string;
2899
- url: string;
2900
- error_scope?: any;
2901
- success_scope?: any;
2902
- error?: (message: 'TIMED_OUT' | 'GENERAL', xhr: XMLHttpRequest, settings: XHRSettings) => void;
2903
- success?: (text: string, xhr: XMLHttpRequest, settings: XHRSettings) => void;
2904
- }
2905
- interface XHREventMap {
2906
- beforeInitialize: {
2907
- settings: XHRSettings;
2908
- };
2909
- beforeSend: {
2910
- xhr: XMLHttpRequest;
2911
- settings: XHRSettings;
2912
- };
2913
- }
2914
- interface XHR extends Observable<XHREventMap> {
2915
- send(this: XHR, settings: XHRSettings): void;
2916
- }
2917
2795
  interface DOMUtilsNamespace {
2918
- new (doc: Document, settings: Partial<DOMUtilsSettings>): DOMUtils;
2796
+ (doc: Document, settings: Partial<DOMUtilsSettings>): DOMUtils;
2919
2797
  DOM: DOMUtils;
2920
2798
  nodeIndex: (node: Node, normalized?: boolean) => number;
2921
2799
  }
2922
2800
  interface RangeUtilsNamespace {
2923
- new (dom: DOMUtils): RangeUtils;
2801
+ (dom: DOMUtils): RangeUtils;
2924
2802
  compareRanges: (rng1: RangeLikeObject, rng2: RangeLikeObject) => boolean;
2925
2803
  getCaretRangeFromPoint: (clientX: number, clientY: number, doc: Document) => Range;
2926
2804
  getSelectedNode: (range: Range) => Node;
2927
2805
  getNode: (container: Node, offset: number) => Node;
2928
2806
  }
2929
2807
  interface AddOnManagerNamespace {
2930
- new <T>(): AddOnManager<T>;
2808
+ <T>(): AddOnManager<T>;
2931
2809
  language: string | undefined;
2932
2810
  languageLoad: boolean;
2933
2811
  baseURL: string;
2934
2812
  PluginManager: PluginManager;
2935
2813
  ThemeManager: ThemeManager;
2814
+ ModelManager: ModelManager;
2936
2815
  }
2937
2816
  interface BookmarkManagerNamespace {
2938
2817
  (selection: EditorSelection): BookmarkManager;
2939
2818
  isBookmarkNode: (node: Node) => boolean;
2940
2819
  }
2941
- interface SaxParserNamespace {
2942
- new (settings?: SaxParserSettings, schema?: Schema): SaxParser;
2943
- findEndTag: (schema: Schema, html: string, startIndex: number) => number;
2944
- }
2945
2820
  interface TinyMCE extends EditorManager {
2946
2821
  geom: {
2947
2822
  Rect: Rect;
2948
2823
  };
2949
2824
  util: {
2950
- Promise: PromiseConstructor;
2951
2825
  Delay: Delay;
2952
2826
  Tools: Tools;
2953
2827
  VK: VK;
2954
2828
  URI: URIConstructor;
2955
- Class: Class;
2956
2829
  EventDispatcher: EventDispatcherConstructor<any>;
2957
2830
  Observable: Observable<any>;
2958
2831
  I18n: I18n;
2959
- XHR: XHR;
2960
- JSON: JSONUtils;
2961
- JSONRequest: JSONRequestConstructor;
2962
- JSONP: JSONP;
2963
2832
  LocalStorage: Storage;
2964
- Color: ColorConstructor;
2965
2833
  ImageUploader: ImageUploader;
2966
2834
  };
2967
2835
  dom: {
2968
2836
  EventUtils: EventUtilsConstructor;
2969
- Sizzle: any;
2970
- DomQuery: DomQueryConstructor;
2971
2837
  TreeWalker: DomTreeWalkerConstructor;
2972
- TextSeeker: new (dom: DOMUtils, isBlockBoundary?: (node: Node) => boolean) => TextSeeker;
2838
+ TextSeeker: (dom: DOMUtils, isBlockBoundary?: (node: Node) => boolean) => TextSeeker;
2973
2839
  DOMUtils: DOMUtilsNamespace;
2974
2840
  ScriptLoader: ScriptLoaderConstructor;
2975
2841
  RangeUtils: RangeUtilsNamespace;
2976
- Serializer: new (settings: DomSerializerSettings, editor?: Editor) => DomSerializer;
2842
+ Serializer: (settings: DomSerializerSettings, editor?: Editor) => DomSerializer;
2977
2843
  ControlSelection: (selection: EditorSelection, editor: Editor) => ControlSelection;
2978
2844
  BookmarkManager: BookmarkManagerNamespace;
2979
- Selection: new (dom: DOMUtils, win: Window, serializer: DomSerializer, editor: Editor) => EditorSelection;
2980
- StyleSheetLoader: new (documentOrShadowRoot: Document | ShadowRoot, settings: StyleSheetLoaderSettings) => StyleSheetLoader;
2845
+ Selection: (dom: DOMUtils, win: Window, serializer: DomSerializer, editor: Editor) => EditorSelection;
2846
+ StyleSheetLoader: (documentOrShadowRoot: Document | ShadowRoot, settings: StyleSheetLoaderSettings) => StyleSheetLoader;
2981
2847
  Event: EventUtils;
2982
2848
  };
2983
2849
  html: {
2984
- Styles: new (settings?: StylesSettings, schema?: Schema) => Styles;
2850
+ Styles: (settings?: StylesSettings, schema?: Schema) => Styles;
2985
2851
  Entities: Entities;
2986
2852
  Node: AstNodeConstructor;
2987
- Schema: new (settings?: SchemaSettings) => Schema;
2988
- SaxParser: SaxParserNamespace;
2989
- DomParser: new (settings?: DomParserSettings, schema?: Schema) => DomParser;
2990
- Writer: new (settings?: WriterSettings) => Writer;
2991
- Serializer: new (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
2853
+ Schema: (settings?: SchemaSettings) => Schema;
2854
+ DomParser: (settings?: DomParserSettings, schema?: Schema) => DomParser;
2855
+ Writer: (settings?: WriterSettings) => Writer;
2856
+ Serializer: (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
2992
2857
  };
2993
2858
  AddOnManager: AddOnManagerNamespace;
2994
- Annotator: new (editor: Editor) => Annotator;
2859
+ Annotator: (editor: Editor) => Annotator;
2995
2860
  Editor: EditorConstructor;
2996
2861
  EditorCommands: EditorCommandsConstructor;
2997
2862
  EditorManager: EditorManager;
2998
2863
  EditorObservable: EditorObservable;
2999
2864
  Env: Env;
3000
2865
  FocusManager: FocusManager;
3001
- Formatter: new (editor: Editor) => Formatter;
3002
- NotificationManager: new (editor: Editor) => NotificationManager;
2866
+ Formatter: (editor: Editor) => Formatter;
2867
+ NotificationManager: (editor: Editor) => NotificationManager;
3003
2868
  Shortcuts: ShortcutsConstructor;
3004
- UndoManager: new (editor: Editor) => UndoManager;
3005
- WindowManager: new (editor: Editor) => WindowManager;
2869
+ UndoManager: (editor: Editor) => UndoManager;
2870
+ WindowManager: (editor: Editor) => WindowManager;
3006
2871
  DOM: DOMUtils;
3007
2872
  ScriptLoader: ScriptLoader;
3008
2873
  PluginManager: PluginManager;
3009
2874
  ThemeManager: ThemeManager;
2875
+ ModelManager: ModelManager;
3010
2876
  IconManager: IconManager;
3011
2877
  Resource: Resource;
2878
+ FakeClipboard: FakeClipboard;
3012
2879
  trim: Tools['trim'];
3013
2880
  isArray: Tools['isArray'];
3014
2881
  is: Tools['is'];
@@ -3019,18 +2886,10 @@ interface TinyMCE extends EditorManager {
3019
2886
  grep: Tools['grep'];
3020
2887
  inArray: Tools['inArray'];
3021
2888
  extend: Tools['extend'];
3022
- create: Tools['create'];
3023
2889
  walk: Tools['walk'];
3024
- createNS: Tools['createNS'];
3025
2890
  resolve: Tools['resolve'];
3026
2891
  explode: Tools['explode'];
3027
2892
  _addCacheSuffix: Tools['_addCacheSuffix'];
3028
- isOpera: boolean;
3029
- isWebKit: boolean;
3030
- isIE: false | number;
3031
- isGecko: boolean;
3032
- isMac: boolean;
3033
2893
  }
3034
2894
  declare const tinymce: TinyMCE;
3035
- export default tinymce;
3036
- export { AddOnManager, Annotator, AstNode, Bookmark, BookmarkManager, Class, Color, ControlSelection, DOMUtils, Delay, DomParser, DomParserSettings, DomQuery, DomSerializer, DomSerializerSettings, DomTreeWalker, Editor, EditorCommands, EditorEvent, EditorManager, EditorModeApi, EditorObservable, EditorSelection, EditorSettings, Entities, Env, EventDispatcher, EventUtils, EventTypes_d as Events, FocusManager, Format_d as Formats, Formatter, GeomRect, HtmlSerializer, HtmlSerializerSettings, I18n, IconManager, JSONUtils as JSON, JSONP, JSONRequest, JSONRequestArgs, JSONRequestSettings, NotificationApi, NotificationManager, NotificationSpec, Observable, Plugin, PluginManager, RangeUtils, RawEditorSettings, Rect, Resource, SaxParser, SaxParserSettings, Schema, SchemaSettings, ScriptLoader, Shortcuts, StyleSheetLoader, Styles, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, XHR, XHRSettings };
2895
+ export { AddOnManager, Annotator, AstNode, Bookmark, BookmarkManager, ControlSelection, DOMUtils, Delay, DomParser, DomParserSettings, DomSerializer, DomSerializerSettings, DomTreeWalker, Editor, EditorCommands, EditorEvent, EditorManager, EditorModeApi, EditorObservable, EditorOptions, EditorSelection, Entities, Env, EventDispatcher, EventUtils, EventTypes_d as Events, FakeClipboard, FocusManager, Format_d as Formats, Formatter, GeomRect, HtmlSerializer, HtmlSerializerSettings, I18n, IconManager, Model, ModelManager, NotificationApi, NotificationManager, NotificationSpec, Observable, Plugin, PluginManager, RangeUtils, RawEditorOptions, Rect, Resource, Schema, SchemaSettings, ScriptLoader, Shortcuts, StyleSheetLoader, Styles, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, tinymce as default };