tinymce-rails 8.0.2 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/app/assets/source/tinymce/tinymce.js +323 -347
  4. data/lib/tinymce/rails/version.rb +2 -2
  5. data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
  7. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
  8. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  10. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
  12. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
  13. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
  15. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
  16. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
  17. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  19. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  21. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
  22. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  24. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.css +1 -1
  25. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.css +1 -1
  26. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  28. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  30. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -1
  31. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  33. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.css +1 -1
  34. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -1
  35. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  37. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  39. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -1
  40. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  42. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/tinymce.d.ts +405 -399
  44. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  45. metadata +1 -1
@@ -162,36 +162,6 @@ declare class AstNode {
162
162
  isEmpty(elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean): boolean;
163
163
  walk(prev?: boolean): AstNode | null | undefined;
164
164
  }
165
- type Content = string | AstNode;
166
- type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
167
- interface GetContentArgs {
168
- format: ContentFormat;
169
- get: boolean;
170
- getInner: boolean;
171
- no_events?: boolean;
172
- save?: boolean;
173
- source_view?: boolean;
174
- [key: string]: any;
175
- }
176
- interface SetContentArgs {
177
- format: string;
178
- set: boolean;
179
- content: Content;
180
- no_events?: boolean;
181
- no_selection?: boolean;
182
- paste?: boolean;
183
- load?: boolean;
184
- initial?: boolean;
185
- [key: string]: any;
186
- }
187
- interface GetSelectionContentArgs extends GetContentArgs {
188
- selection?: boolean;
189
- contextual?: boolean;
190
- }
191
- interface SetSelectionContentArgs extends SetContentArgs {
192
- content: string;
193
- selection?: boolean;
194
- }
195
165
  interface BlobInfoData {
196
166
  id?: string;
197
167
  name?: string;
@@ -223,51 +193,76 @@ interface BlobCache {
223
193
  removeByUri: (blobUri: string) => void;
224
194
  destroy: () => void;
225
195
  }
226
- interface BlobInfoImagePair {
227
- image: HTMLImageElement;
228
- blobInfo: BlobInfo;
196
+ interface NotificationManagerImpl {
197
+ open: (spec: NotificationSpec, closeCallback: () => void, hasEditorFocus: () => boolean) => NotificationApi;
198
+ close: <T extends NotificationApi>(notification: T) => void;
199
+ getArgs: <T extends NotificationApi>(notification: T) => NotificationSpec;
229
200
  }
230
- interface UrlObject {
231
- prefix: string;
232
- resource: string;
233
- suffix: string;
201
+ interface NotificationSpec {
202
+ type?: 'info' | 'warning' | 'error' | 'success';
203
+ text: string;
204
+ icon?: string;
205
+ progressBar?: boolean;
206
+ timeout?: number;
234
207
  }
235
- type WaitState = 'added' | 'loaded';
236
- type AddOnConstructor<T> = (editor: Editor, url: string) => T;
237
- interface AddOnManager<T> {
238
- items: AddOnConstructor<T>[];
239
- urls: Record<string, string>;
240
- lookup: Record<string, {
241
- instance: AddOnConstructor<T>;
242
- }>;
243
- get: (name: string) => AddOnConstructor<T> | undefined;
244
- requireLangPack: (name: string, languages?: string) => void;
245
- add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
246
- remove: (name: string) => void;
247
- createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
248
- load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
249
- waitFor: (name: string, state?: WaitState) => Promise<void>;
208
+ interface NotificationApi {
209
+ close: () => void;
210
+ progressBar: {
211
+ value: (percent: number) => void;
212
+ };
213
+ text: (text: string) => void;
214
+ reposition: () => void;
215
+ getEl: () => HTMLElement;
216
+ settings: NotificationSpec;
250
217
  }
251
- type LicenseKeyManagerAddon = AddOnConstructor<LicenseKeyManager>;
252
- interface ValidateData {
253
- plugin?: string;
254
- [key: string]: any;
218
+ interface NotificationManager {
219
+ open: (spec: NotificationSpec) => NotificationApi;
220
+ close: () => void;
221
+ getNotifications: () => NotificationApi[];
255
222
  }
256
- interface LicenseKeyManager {
257
- readonly validate: (data: ValidateData) => Promise<boolean>;
223
+ interface UploadFailure {
224
+ message: string;
225
+ remove?: boolean;
258
226
  }
259
- declare class NodeChange {
260
- private readonly editor;
261
- private lastPath;
262
- constructor(editor: Editor);
263
- nodeChanged(args?: Record<string, any>): void;
264
- private isSameElementPath;
227
+ type ProgressFn = (percent: number) => void;
228
+ type UploadHandler = (blobInfo: BlobInfo, progress: ProgressFn) => Promise<string>;
229
+ interface UploadResult$2 {
230
+ url: string;
231
+ blobInfo: BlobInfo;
232
+ status: boolean;
233
+ error?: UploadFailure;
265
234
  }
266
- interface SelectionOverrides {
267
- showCaret: (direction: number, node: HTMLElement, before: boolean, scrollIntoView?: boolean) => Range | null;
268
- showBlockCaretContainer: (blockCaretContainer: HTMLElement) => void;
269
- hideFakeCaret: () => void;
270
- destroy: () => void;
235
+ interface IsEmptyOptions {
236
+ readonly skipBogus?: boolean;
237
+ readonly includeZwsp?: boolean;
238
+ readonly checkRootAsContent?: boolean;
239
+ readonly isContent?: (node: Node) => boolean;
240
+ }
241
+ interface GeomRect {
242
+ readonly x: number;
243
+ readonly y: number;
244
+ readonly w: number;
245
+ readonly h: number;
246
+ }
247
+ interface Rect {
248
+ inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
249
+ relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
250
+ findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
251
+ intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
252
+ clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
253
+ create: (x: number, y: number, w: number, h: number) => GeomRect;
254
+ fromClientRect: (clientRect: DOMRect) => GeomRect;
255
+ }
256
+ type StyleMap = Record<string, string | number>;
257
+ interface StylesSettings {
258
+ allow_script_urls?: boolean;
259
+ allow_svg_data_urls?: boolean;
260
+ url_converter?: URLConverter;
261
+ url_converter_scope?: any;
262
+ }
263
+ interface Styles {
264
+ parse: (css: string | undefined) => Record<string, string>;
265
+ serialize: (styles: StyleMap, elementName?: string) => string;
271
266
  }
272
267
  type NormalizedEvent<E, T = any> = E & {
273
268
  readonly type: string;
@@ -347,127 +342,220 @@ declare class EventDispatcher<T extends {}> {
347
342
  once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
348
343
  has(name: string): boolean;
349
344
  }
350
- type UndoLevelType = 'fragmented' | 'complete';
351
- interface BaseUndoLevel {
352
- type: UndoLevelType;
353
- bookmark: Bookmark | null;
354
- beforeBookmark: Bookmark | null;
355
- }
356
- interface FragmentedUndoLevel extends BaseUndoLevel {
357
- type: 'fragmented';
358
- fragments: string[];
359
- content: '';
360
- }
361
- interface CompleteUndoLevel extends BaseUndoLevel {
362
- type: 'complete';
363
- fragments: null;
364
- content: string;
365
- }
366
- type NewUndoLevel = CompleteUndoLevel | FragmentedUndoLevel;
367
- type UndoLevel = NewUndoLevel & {
368
- bookmark: Bookmark;
345
+ type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void | boolean;
346
+ type EventUtilsEvent<T> = NormalizedEvent<T> & {
347
+ metaKey: boolean;
369
348
  };
370
- interface UndoManager {
371
- data: UndoLevel[];
372
- typing: boolean;
373
- add: (level?: Partial<UndoLevel>, event?: EditorEvent<any>) => UndoLevel | null;
374
- dispatchChange: () => void;
375
- beforeChange: () => void;
376
- undo: () => UndoLevel | undefined;
377
- redo: () => UndoLevel | undefined;
378
- clear: () => void;
379
- reset: () => void;
380
- hasUndo: () => boolean;
381
- hasRedo: () => boolean;
382
- transact: (callback: () => void) => UndoLevel | null;
383
- ignore: (callback: () => void) => void;
384
- extra: (callback1: () => void, callback2: () => void) => void;
349
+ interface Callback$1<T> {
350
+ func: EventUtilsCallback<T>;
351
+ scope: any;
385
352
  }
386
- interface Quirks {
387
- refreshContentEditable(): void;
388
- isHidden(): boolean;
353
+ interface CallbackList<T> extends Array<Callback$1<T>> {
354
+ fakeName: string | false;
355
+ capture: boolean;
356
+ nativeHandler: EventListener;
389
357
  }
390
- type DecoratorData = Record<string, any>;
391
- type Decorator = (uid: string, data: DecoratorData) => {
392
- attributes?: {};
393
- classes?: string[];
394
- };
395
- type AnnotationListener = (state: boolean, name: string, data?: {
396
- uid: string;
397
- nodes: any[];
398
- }) => void;
399
- type AnnotationListenerApi = AnnotationListener;
400
- interface AnnotatorSettings {
401
- decorate: Decorator;
402
- persistent?: boolean;
358
+ interface EventUtilsConstructor {
359
+ readonly prototype: EventUtils;
360
+ new (): EventUtils;
361
+ Event: EventUtils;
403
362
  }
404
- interface Annotator {
405
- register: (name: string, settings: AnnotatorSettings) => void;
406
- annotate: (name: string, data: DecoratorData) => void;
407
- annotationChanged: (name: string, f: AnnotationListenerApi) => void;
408
- remove: (name: string) => void;
409
- removeAll: (name: string) => void;
410
- getAll: (name: string) => Record<string, Element[]>;
363
+ declare class EventUtils {
364
+ static Event: EventUtils;
365
+ domLoaded: boolean;
366
+ events: Record<number, Record<string, CallbackList<any>>>;
367
+ private readonly expando;
368
+ private hasFocusIn;
369
+ private count;
370
+ constructor();
371
+ bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
372
+ bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
373
+ unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
374
+ unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
375
+ unbind(target: any): this;
376
+ fire(target: any, name: string, args?: {}): this;
377
+ dispatch(target: any, name: string, args?: {}): this;
378
+ clean(target: any): this;
379
+ destroy(): void;
380
+ cancel<T>(e: EventUtilsEvent<T>): boolean;
381
+ private executeHandlers;
411
382
  }
412
- interface IsEmptyOptions {
413
- readonly skipBogus?: boolean;
414
- readonly includeZwsp?: boolean;
415
- readonly checkRootAsContent?: boolean;
416
- readonly isContent?: (node: Node) => boolean;
383
+ interface StyleSheetLoaderSettings {
384
+ maxLoadTime?: number;
385
+ contentCssCors?: boolean;
386
+ crossOrigin?: (url: string) => string | undefined;
387
+ referrerPolicy?: ReferrerPolicy;
417
388
  }
418
- interface GeomRect {
419
- readonly x: number;
420
- readonly y: number;
421
- readonly w: number;
422
- readonly h: number;
389
+ interface StyleSheetLoader {
390
+ load: (url: string) => Promise<void>;
391
+ loadRawCss: (key: string, css: string) => void;
392
+ loadAll: (urls: string[]) => Promise<string[]>;
393
+ unload: (url: string) => void;
394
+ unloadRawCss: (key: string) => void;
395
+ unloadAll: (urls: string[]) => void;
396
+ _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
397
+ _setContentCssCors: (contentCssCors: boolean) => void;
398
+ _setCrossOrigin: (crossOrigin: (url: string) => string | undefined) => void;
423
399
  }
424
- interface Rect {
425
- inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
426
- relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
427
- findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
428
- intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
429
- clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
430
- create: (x: number, y: number, w: number, h: number) => GeomRect;
431
- fromClientRect: (clientRect: DOMRect) => GeomRect;
432
- }
433
- interface NotificationManagerImpl {
434
- open: (spec: NotificationSpec, closeCallback: () => void, hasEditorFocus: () => boolean) => NotificationApi;
435
- close: <T extends NotificationApi>(notification: T) => void;
436
- getArgs: <T extends NotificationApi>(notification: T) => NotificationSpec;
400
+ interface SetAttribEvent {
401
+ attrElm: HTMLElement;
402
+ attrName: string;
403
+ attrValue: string | boolean | number | null;
437
404
  }
438
- interface NotificationSpec {
439
- type?: 'info' | 'warning' | 'error' | 'success';
440
- text: string;
441
- icon?: string;
442
- progressBar?: boolean;
443
- timeout?: number;
405
+ interface DOMUtilsSettings {
406
+ schema: Schema;
407
+ url_converter: URLConverter;
408
+ url_converter_scope: any;
409
+ ownEvents: boolean;
410
+ keep_values: boolean;
411
+ update_styles: boolean;
412
+ root_element: HTMLElement | null;
413
+ collect: boolean;
414
+ onSetAttrib: (event: SetAttribEvent) => void;
415
+ contentCssCors: boolean;
416
+ referrerPolicy: ReferrerPolicy;
417
+ crossOrigin: (url: string, resourceType: 'script' | 'stylesheet') => string | undefined;
444
418
  }
445
- interface NotificationApi {
446
- close: () => void;
447
- progressBar: {
448
- value: (percent: number) => void;
419
+ type Target = Node | Window;
420
+ type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
421
+ type BoundEvent = [
422
+ Target,
423
+ string,
424
+ EventUtilsCallback<any>,
425
+ any
426
+ ];
427
+ type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
428
+ type RunResult<T, R> = T extends Array<any> ? R[] : false | R;
429
+ interface DOMUtils {
430
+ doc: Document;
431
+ settings: Partial<DOMUtilsSettings>;
432
+ win: Window;
433
+ files: Record<string, boolean>;
434
+ stdMode: boolean;
435
+ boxModel: boolean;
436
+ styleSheetLoader: StyleSheetLoader;
437
+ boundEvents: BoundEvent[];
438
+ styles: Styles;
439
+ schema: Schema;
440
+ events: EventUtils;
441
+ root: Node | null;
442
+ isBlock: {
443
+ (node: Node | null): node is HTMLElement;
444
+ (node: string): boolean;
449
445
  };
450
- text: (text: string) => void;
451
- reposition: () => void;
452
- getEl: () => HTMLElement;
453
- settings: NotificationSpec;
454
- }
455
- interface NotificationManager {
456
- open: (spec: NotificationSpec) => NotificationApi;
457
- close: () => void;
458
- getNotifications: () => NotificationApi[];
459
- }
460
- interface UploadFailure {
461
- message: string;
462
- remove?: boolean;
463
- }
464
- type ProgressFn = (percent: number) => void;
465
- type UploadHandler = (blobInfo: BlobInfo, progress: ProgressFn) => Promise<string>;
466
- interface UploadResult$2 {
467
- url: string;
468
- blobInfo: BlobInfo;
469
- status: boolean;
470
- error?: UploadFailure;
446
+ clone: (node: Node, deep: boolean) => Node;
447
+ getRoot: () => HTMLElement;
448
+ getViewPort: (argWin?: Window) => GeomRect;
449
+ getRect: (elm: string | HTMLElement) => GeomRect;
450
+ getSize: (elm: string | HTMLElement) => {
451
+ w: number;
452
+ h: number;
453
+ };
454
+ getParent: {
455
+ <K extends keyof HTMLElementTagNameMap>(node: string | Node | null, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
456
+ <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node): T | null;
457
+ (node: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node): Node | null;
458
+ };
459
+ getParents: {
460
+ <K extends keyof HTMLElementTagNameMap>(elm: string | HTMLElementTagNameMap[K] | null, selector: K, root?: Node, collect?: boolean): Array<HTMLElementTagNameMap[K]>;
461
+ <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node, collect?: boolean): T[];
462
+ (elm: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node, collect?: boolean): Node[];
463
+ };
464
+ get: {
465
+ <T extends Node>(elm: T): T;
466
+ (elm: string): HTMLElement | null;
467
+ };
468
+ getNext: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
469
+ getPrev: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
470
+ select: {
471
+ <K extends keyof HTMLElementTagNameMap>(selector: K, scope?: string | Node): Array<HTMLElementTagNameMap[K]>;
472
+ <T extends HTMLElement = HTMLElement>(selector: string, scope?: string | Node): T[];
473
+ };
474
+ is: {
475
+ <T extends Element>(elm: Node | Node[] | null, selector: string): elm is T;
476
+ (elm: Node | Node[] | null, selector: string): boolean;
477
+ };
478
+ add: (parentElm: RunArguments, name: string | Element, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null, create?: boolean) => HTMLElement;
479
+ create: {
480
+ <K extends keyof HTMLElementTagNameMap>(name: K, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElementTagNameMap[K];
481
+ (name: string, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElement;
482
+ };
483
+ createHTML: (name: string, attrs?: Record<string, string | null>, html?: string) => string;
484
+ createFragment: (html?: string) => DocumentFragment;
485
+ remove: {
486
+ <T extends Node>(node: T | T[], keepChildren?: boolean): typeof node extends Array<any> ? T[] : T;
487
+ <T extends Node>(node: string, keepChildren?: boolean): T | false;
488
+ };
489
+ getStyle: {
490
+ (elm: Element, name: string, computed: true): string;
491
+ (elm: string | Element | null, name: string, computed?: boolean): string | undefined;
492
+ };
493
+ setStyle: (elm: string | Element | Element[], name: string, value: string | number | null) => void;
494
+ setStyles: (elm: string | Element | Element[], stylesArg: StyleMap) => void;
495
+ removeAllAttribs: (e: RunArguments<Element>) => void;
496
+ setAttrib: (elm: RunArguments<Element>, name: string, value: string | boolean | number | null) => void;
497
+ setAttribs: (elm: RunArguments<Element>, attrs: Record<string, string | boolean | number | null>) => void;
498
+ getAttrib: (elm: string | Element | null, name: string, defaultVal?: string) => string;
499
+ getAttribs: (elm: string | Element) => NamedNodeMap | Attr[];
500
+ getPos: (elm: string | Element, rootElm?: Node) => {
501
+ x: number;
502
+ y: number;
503
+ };
504
+ parseStyle: (cssText: string) => Record<string, string>;
505
+ serializeStyle: (stylesArg: StyleMap, name?: string) => string;
506
+ addStyle: (cssText: string) => void;
507
+ loadCSS: (url: string) => void;
508
+ hasClass: (elm: string | Element, cls: string) => boolean;
509
+ addClass: (elm: RunArguments<Element>, cls: string) => void;
510
+ removeClass: (elm: RunArguments<Element>, cls: string) => void;
511
+ toggleClass: (elm: RunArguments<Element>, cls: string, state?: boolean) => void;
512
+ show: (elm: string | Node | Node[]) => void;
513
+ hide: (elm: string | Node | Node[]) => void;
514
+ isHidden: (elm: string | Node) => boolean;
515
+ uniqueId: (prefix?: string) => string;
516
+ setHTML: (elm: RunArguments<Element>, html: string) => void;
517
+ getOuterHTML: (elm: string | Node) => string;
518
+ setOuterHTML: (elm: string | Node | Node[], html: string) => void;
519
+ decode: (text: string) => string;
520
+ encode: (text: string) => string;
521
+ insertAfter: {
522
+ <T extends Node>(node: T | T[], reference: string | Node): T;
523
+ <T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult<typeof node, T>;
524
+ };
525
+ replace: {
526
+ <T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
527
+ <T extends Node>(newElm: Node, oldElm: RunArguments<T>, keepChildren?: boolean): false | T;
528
+ };
529
+ rename: {
530
+ <K extends keyof HTMLElementTagNameMap>(elm: Element, name: K): HTMLElementTagNameMap[K];
531
+ (elm: Element, name: string): Element;
532
+ };
533
+ findCommonAncestor: (a: Node, b: Node) => Node | null;
534
+ run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): typeof elm extends Array<any> ? R[] : R;
535
+ run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): RunResult<typeof elm, R>;
536
+ isEmpty: (node: Node, elements?: Record<string, any>, options?: IsEmptyOptions) => boolean;
537
+ createRng: () => Range;
538
+ nodeIndex: (node: Node, normalized?: boolean) => number;
539
+ split: {
540
+ <T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T | undefined;
541
+ <T extends Node>(parentElm: Node, splitElm: T): T | undefined;
542
+ };
543
+ bind: {
544
+ <K extends string>(target: Target, name: K, func: Callback<K>, scope?: any): Callback<K>;
545
+ <K extends string>(target: Target[], name: K, func: Callback<K>, scope?: any): Callback<K>[];
546
+ };
547
+ unbind: {
548
+ <K extends string>(target: Target, name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils;
549
+ <K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
550
+ };
551
+ fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
552
+ dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
553
+ getContentEditable: (node: Node) => string | null;
554
+ getContentEditableParent: (node: Node) => string | null;
555
+ isEditable: (node: Node | null | undefined) => boolean;
556
+ destroy: () => void;
557
+ isChildOf: (node: Node, parent: Node) => boolean;
558
+ dumpRng: (r: Range) => string;
471
559
  }
472
560
  type BlockPatternTrigger = 'enter' | 'space';
473
561
  interface RawPattern {
@@ -1481,6 +1569,42 @@ interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineForm
1481
1569
  }
1482
1570
  interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
1483
1571
  }
1572
+ type UndoLevelType = 'fragmented' | 'complete';
1573
+ interface BaseUndoLevel {
1574
+ type: UndoLevelType;
1575
+ bookmark: Bookmark | null;
1576
+ beforeBookmark: Bookmark | null;
1577
+ }
1578
+ interface FragmentedUndoLevel extends BaseUndoLevel {
1579
+ type: 'fragmented';
1580
+ fragments: string[];
1581
+ content: '';
1582
+ }
1583
+ interface CompleteUndoLevel extends BaseUndoLevel {
1584
+ type: 'complete';
1585
+ fragments: null;
1586
+ content: string;
1587
+ }
1588
+ type NewUndoLevel = CompleteUndoLevel | FragmentedUndoLevel;
1589
+ type UndoLevel = NewUndoLevel & {
1590
+ bookmark: Bookmark;
1591
+ };
1592
+ interface UndoManager {
1593
+ data: UndoLevel[];
1594
+ typing: boolean;
1595
+ add: (level?: Partial<UndoLevel>, event?: EditorEvent<any>) => UndoLevel | null;
1596
+ dispatchChange: () => void;
1597
+ beforeChange: () => void;
1598
+ undo: () => UndoLevel | undefined;
1599
+ redo: () => UndoLevel | undefined;
1600
+ clear: () => void;
1601
+ reset: () => void;
1602
+ hasUndo: () => boolean;
1603
+ hasRedo: () => boolean;
1604
+ transact: (callback: () => void) => UndoLevel | null;
1605
+ ignore: (callback: () => void) => void;
1606
+ extra: (callback1: () => void, callback2: () => void) => void;
1607
+ }
1484
1608
  interface Filter<C extends Function> {
1485
1609
  name: string;
1486
1610
  callbacks: C[];
@@ -1536,23 +1660,6 @@ interface DomParser {
1536
1660
  removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
1537
1661
  parse: (html: string, args?: ParserArgs) => AstNode;
1538
1662
  }
1539
- interface StyleSheetLoaderSettings {
1540
- maxLoadTime?: number;
1541
- contentCssCors?: boolean;
1542
- crossOrigin?: (url: string) => string | undefined;
1543
- referrerPolicy?: ReferrerPolicy;
1544
- }
1545
- interface StyleSheetLoader {
1546
- load: (url: string) => Promise<void>;
1547
- loadRawCss: (key: string, css: string) => void;
1548
- loadAll: (urls: string[]) => Promise<string[]>;
1549
- unload: (url: string) => void;
1550
- unloadRawCss: (key: string) => void;
1551
- unloadAll: (urls: string[]) => void;
1552
- _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
1553
- _setContentCssCors: (contentCssCors: boolean) => void;
1554
- _setCrossOrigin: (crossOrigin: (url: string) => string | undefined) => void;
1555
- }
1556
1663
  type Registry = Registry$1;
1557
1664
  interface EditorUiApi {
1558
1665
  show: () => void;
@@ -2259,214 +2366,109 @@ interface EditorOptions extends NormalizedEditorOptions {
2259
2366
  xss_sanitization: boolean;
2260
2367
  disabled: boolean;
2261
2368
  }
2262
- type StyleMap = Record<string, string | number>;
2263
- interface StylesSettings {
2264
- allow_script_urls?: boolean;
2265
- allow_svg_data_urls?: boolean;
2266
- url_converter?: URLConverter;
2267
- url_converter_scope?: any;
2268
- }
2269
- interface Styles {
2270
- parse: (css: string | undefined) => Record<string, string>;
2271
- serialize: (styles: StyleMap, elementName?: string) => string;
2272
- }
2273
- type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void | boolean;
2274
- type EventUtilsEvent<T> = NormalizedEvent<T> & {
2275
- metaKey: boolean;
2276
- };
2277
- interface Callback$1<T> {
2278
- func: EventUtilsCallback<T>;
2279
- scope: any;
2369
+ type Content = string | AstNode;
2370
+ type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
2371
+ interface GetContentArgs {
2372
+ format: ContentFormat;
2373
+ get: boolean;
2374
+ getInner: boolean;
2375
+ no_events?: boolean;
2376
+ save?: boolean;
2377
+ source_view?: boolean;
2378
+ indent?: boolean;
2379
+ entity_encoding?: EntityEncoding;
2380
+ [key: string]: any;
2280
2381
  }
2281
- interface CallbackList<T> extends Array<Callback$1<T>> {
2282
- fakeName: string | false;
2283
- capture: boolean;
2284
- nativeHandler: EventListener;
2382
+ interface SetContentArgs {
2383
+ format: string;
2384
+ set: boolean;
2385
+ content: Content;
2386
+ no_events?: boolean;
2387
+ no_selection?: boolean;
2388
+ paste?: boolean;
2389
+ load?: boolean;
2390
+ initial?: boolean;
2391
+ [key: string]: any;
2285
2392
  }
2286
- interface EventUtilsConstructor {
2287
- readonly prototype: EventUtils;
2288
- new (): EventUtils;
2289
- Event: EventUtils;
2393
+ interface GetSelectionContentArgs extends GetContentArgs {
2394
+ selection?: boolean;
2395
+ contextual?: boolean;
2290
2396
  }
2291
- declare class EventUtils {
2292
- static Event: EventUtils;
2293
- domLoaded: boolean;
2294
- events: Record<number, Record<string, CallbackList<any>>>;
2295
- private readonly expando;
2296
- private hasFocusIn;
2297
- private count;
2298
- constructor();
2299
- bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
2300
- bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
2301
- unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
2302
- unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
2303
- unbind(target: any): this;
2304
- fire(target: any, name: string, args?: {}): this;
2305
- dispatch(target: any, name: string, args?: {}): this;
2306
- clean(target: any): this;
2307
- destroy(): void;
2308
- cancel<T>(e: EventUtilsEvent<T>): boolean;
2309
- private executeHandlers;
2397
+ interface SetSelectionContentArgs extends SetContentArgs {
2398
+ content: string;
2399
+ selection?: boolean;
2310
2400
  }
2311
- interface SetAttribEvent {
2312
- attrElm: HTMLElement;
2313
- attrName: string;
2314
- attrValue: string | boolean | number | null;
2401
+ interface BlobInfoImagePair {
2402
+ image: HTMLImageElement;
2403
+ blobInfo: BlobInfo;
2315
2404
  }
2316
- interface DOMUtilsSettings {
2317
- schema: Schema;
2318
- url_converter: URLConverter;
2319
- url_converter_scope: any;
2320
- ownEvents: boolean;
2321
- keep_values: boolean;
2322
- update_styles: boolean;
2323
- root_element: HTMLElement | null;
2324
- collect: boolean;
2325
- onSetAttrib: (event: SetAttribEvent) => void;
2326
- contentCssCors: boolean;
2327
- referrerPolicy: ReferrerPolicy;
2328
- crossOrigin: (url: string, resourceType: 'script' | 'stylesheet') => string | undefined;
2405
+ interface UrlObject {
2406
+ prefix: string;
2407
+ resource: string;
2408
+ suffix: string;
2329
2409
  }
2330
- type Target = Node | Window;
2331
- type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
2332
- type BoundEvent = [
2333
- Target,
2334
- string,
2335
- EventUtilsCallback<any>,
2336
- any
2337
- ];
2338
- type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
2339
- type RunResult<T, R> = T extends Array<any> ? R[] : false | R;
2340
- interface DOMUtils {
2341
- doc: Document;
2342
- settings: Partial<DOMUtilsSettings>;
2343
- win: Window;
2344
- files: Record<string, boolean>;
2345
- stdMode: boolean;
2346
- boxModel: boolean;
2347
- styleSheetLoader: StyleSheetLoader;
2348
- boundEvents: BoundEvent[];
2349
- styles: Styles;
2350
- schema: Schema;
2351
- events: EventUtils;
2352
- root: Node | null;
2353
- isBlock: {
2354
- (node: Node | null): node is HTMLElement;
2355
- (node: string): boolean;
2356
- };
2357
- clone: (node: Node, deep: boolean) => Node;
2358
- getRoot: () => HTMLElement;
2359
- getViewPort: (argWin?: Window) => GeomRect;
2360
- getRect: (elm: string | HTMLElement) => GeomRect;
2361
- getSize: (elm: string | HTMLElement) => {
2362
- w: number;
2363
- h: number;
2364
- };
2365
- getParent: {
2366
- <K extends keyof HTMLElementTagNameMap>(node: string | Node | null, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
2367
- <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node): T | null;
2368
- (node: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node): Node | null;
2369
- };
2370
- getParents: {
2371
- <K extends keyof HTMLElementTagNameMap>(elm: string | HTMLElementTagNameMap[K] | null, selector: K, root?: Node, collect?: boolean): Array<HTMLElementTagNameMap[K]>;
2372
- <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node, collect?: boolean): T[];
2373
- (elm: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node, collect?: boolean): Node[];
2374
- };
2375
- get: {
2376
- <T extends Node>(elm: T): T;
2377
- (elm: string): HTMLElement | null;
2378
- };
2379
- getNext: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
2380
- getPrev: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
2381
- select: {
2382
- <K extends keyof HTMLElementTagNameMap>(selector: K, scope?: string | Node): Array<HTMLElementTagNameMap[K]>;
2383
- <T extends HTMLElement = HTMLElement>(selector: string, scope?: string | Node): T[];
2384
- };
2385
- is: {
2386
- <T extends Element>(elm: Node | Node[] | null, selector: string): elm is T;
2387
- (elm: Node | Node[] | null, selector: string): boolean;
2388
- };
2389
- add: (parentElm: RunArguments, name: string | Element, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null, create?: boolean) => HTMLElement;
2390
- create: {
2391
- <K extends keyof HTMLElementTagNameMap>(name: K, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElementTagNameMap[K];
2392
- (name: string, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElement;
2393
- };
2394
- createHTML: (name: string, attrs?: Record<string, string | null>, html?: string) => string;
2395
- createFragment: (html?: string) => DocumentFragment;
2396
- remove: {
2397
- <T extends Node>(node: T | T[], keepChildren?: boolean): typeof node extends Array<any> ? T[] : T;
2398
- <T extends Node>(node: string, keepChildren?: boolean): T | false;
2399
- };
2400
- getStyle: {
2401
- (elm: Element, name: string, computed: true): string;
2402
- (elm: string | Element | null, name: string, computed?: boolean): string | undefined;
2403
- };
2404
- setStyle: (elm: string | Element | Element[], name: string, value: string | number | null) => void;
2405
- setStyles: (elm: string | Element | Element[], stylesArg: StyleMap) => void;
2406
- removeAllAttribs: (e: RunArguments<Element>) => void;
2407
- setAttrib: (elm: RunArguments<Element>, name: string, value: string | boolean | number | null) => void;
2408
- setAttribs: (elm: RunArguments<Element>, attrs: Record<string, string | boolean | number | null>) => void;
2409
- getAttrib: (elm: string | Element | null, name: string, defaultVal?: string) => string;
2410
- getAttribs: (elm: string | Element) => NamedNodeMap | Attr[];
2411
- getPos: (elm: string | Element, rootElm?: Node) => {
2412
- x: number;
2413
- y: number;
2414
- };
2415
- parseStyle: (cssText: string) => Record<string, string>;
2416
- serializeStyle: (stylesArg: StyleMap, name?: string) => string;
2417
- addStyle: (cssText: string) => void;
2418
- loadCSS: (url: string) => void;
2419
- hasClass: (elm: string | Element, cls: string) => boolean;
2420
- addClass: (elm: RunArguments<Element>, cls: string) => void;
2421
- removeClass: (elm: RunArguments<Element>, cls: string) => void;
2422
- toggleClass: (elm: RunArguments<Element>, cls: string, state?: boolean) => void;
2423
- show: (elm: string | Node | Node[]) => void;
2424
- hide: (elm: string | Node | Node[]) => void;
2425
- isHidden: (elm: string | Node) => boolean;
2426
- uniqueId: (prefix?: string) => string;
2427
- setHTML: (elm: RunArguments<Element>, html: string) => void;
2428
- getOuterHTML: (elm: string | Node) => string;
2429
- setOuterHTML: (elm: string | Node | Node[], html: string) => void;
2430
- decode: (text: string) => string;
2431
- encode: (text: string) => string;
2432
- insertAfter: {
2433
- <T extends Node>(node: T | T[], reference: string | Node): T;
2434
- <T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult<typeof node, T>;
2435
- };
2436
- replace: {
2437
- <T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
2438
- <T extends Node>(newElm: Node, oldElm: RunArguments<T>, keepChildren?: boolean): false | T;
2439
- };
2440
- rename: {
2441
- <K extends keyof HTMLElementTagNameMap>(elm: Element, name: K): HTMLElementTagNameMap[K];
2442
- (elm: Element, name: string): Element;
2443
- };
2444
- findCommonAncestor: (a: Node, b: Node) => Node | null;
2445
- run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): typeof elm extends Array<any> ? R[] : R;
2446
- run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): RunResult<typeof elm, R>;
2447
- isEmpty: (node: Node, elements?: Record<string, any>, options?: IsEmptyOptions) => boolean;
2448
- createRng: () => Range;
2449
- nodeIndex: (node: Node, normalized?: boolean) => number;
2450
- split: {
2451
- <T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T | undefined;
2452
- <T extends Node>(parentElm: Node, splitElm: T): T | undefined;
2453
- };
2454
- bind: {
2455
- <K extends string>(target: Target, name: K, func: Callback<K>, scope?: any): Callback<K>;
2456
- <K extends string>(target: Target[], name: K, func: Callback<K>, scope?: any): Callback<K>[];
2457
- };
2458
- unbind: {
2459
- <K extends string>(target: Target, name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils;
2460
- <K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
2461
- };
2462
- fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
2463
- dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
2464
- getContentEditable: (node: Node) => string | null;
2465
- getContentEditableParent: (node: Node) => string | null;
2466
- isEditable: (node: Node | null | undefined) => boolean;
2410
+ type WaitState = 'added' | 'loaded';
2411
+ type AddOnConstructor<T> = (editor: Editor, url: string) => T;
2412
+ interface AddOnManager<T> {
2413
+ items: AddOnConstructor<T>[];
2414
+ urls: Record<string, string>;
2415
+ lookup: Record<string, {
2416
+ instance: AddOnConstructor<T>;
2417
+ }>;
2418
+ get: (name: string) => AddOnConstructor<T> | undefined;
2419
+ requireLangPack: (name: string, languages?: string) => void;
2420
+ add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
2421
+ remove: (name: string) => void;
2422
+ createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
2423
+ load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
2424
+ waitFor: (name: string, state?: WaitState) => Promise<void>;
2425
+ }
2426
+ type LicenseKeyManagerAddon = AddOnConstructor<LicenseKeyManager>;
2427
+ interface ValidateData {
2428
+ plugin?: string;
2429
+ [key: string]: any;
2430
+ }
2431
+ interface LicenseKeyManager {
2432
+ readonly validate: (data: ValidateData) => Promise<boolean>;
2433
+ }
2434
+ declare class NodeChange {
2435
+ private readonly editor;
2436
+ private lastPath;
2437
+ constructor(editor: Editor);
2438
+ nodeChanged(args?: Record<string, any>): void;
2439
+ private isSameElementPath;
2440
+ }
2441
+ interface SelectionOverrides {
2442
+ showCaret: (direction: number, node: HTMLElement, before: boolean, scrollIntoView?: boolean) => Range | null;
2443
+ showBlockCaretContainer: (blockCaretContainer: HTMLElement) => void;
2444
+ hideFakeCaret: () => void;
2467
2445
  destroy: () => void;
2468
- isChildOf: (node: Node, parent: Node) => boolean;
2469
- dumpRng: (r: Range) => string;
2446
+ }
2447
+ interface Quirks {
2448
+ refreshContentEditable(): void;
2449
+ isHidden(): boolean;
2450
+ }
2451
+ type DecoratorData = Record<string, any>;
2452
+ type Decorator = (uid: string, data: DecoratorData) => {
2453
+ attributes?: {};
2454
+ classes?: string[];
2455
+ };
2456
+ type AnnotationListener = (state: boolean, name: string, data?: {
2457
+ uid: string;
2458
+ nodes: any[];
2459
+ }) => void;
2460
+ type AnnotationListenerApi = AnnotationListener;
2461
+ interface AnnotatorSettings {
2462
+ decorate: Decorator;
2463
+ persistent?: boolean;
2464
+ }
2465
+ interface Annotator {
2466
+ register: (name: string, settings: AnnotatorSettings) => void;
2467
+ annotate: (name: string, data: DecoratorData) => void;
2468
+ annotationChanged: (name: string, f: AnnotationListenerApi) => void;
2469
+ remove: (name: string) => void;
2470
+ removeAll: (name: string) => void;
2471
+ getAll: (name: string) => Record<string, Element[]>;
2470
2472
  }
2471
2473
  interface ClientRect {
2472
2474
  left: number;
@@ -2522,6 +2524,10 @@ interface DomSerializerSettings extends DomParserSettings, WriterSettings, Schem
2522
2524
  url_converter?: URLConverter;
2523
2525
  url_converter_scope?: {};
2524
2526
  }
2527
+ interface DomSerializerArgs extends ParserArgs {
2528
+ indent?: HtmlSerializerSettings['indent'];
2529
+ entity_encoding?: HtmlSerializerSettings['entity_encoding'];
2530
+ }
2525
2531
  interface DomSerializerImpl {
2526
2532
  schema: Schema;
2527
2533
  addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
@@ -2534,7 +2540,7 @@ interface DomSerializerImpl {
2534
2540
  (node: Element, parserArgs: {
2535
2541
  format: 'tree';
2536
2542
  } & ParserArgs): AstNode;
2537
- (node: Element, parserArgs?: ParserArgs): string;
2543
+ (node: Element, domSerializerArgs?: DomSerializerArgs): string;
2538
2544
  };
2539
2545
  addRules: (rules: string) => void;
2540
2546
  setRules: (rules: string) => void;