tinymce-rails 7.9.2 → 8.0.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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/assets/source/tinymce/tinymce.js +5553 -3001
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
- data/vendor/assets/javascripts/tinymce/models/dom/model.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/he-IL.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/th-TH.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +87 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +93 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.d.ts +180 -141
- data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
- metadata +15 -2
|
@@ -23,120 +23,6 @@ interface PathBookmark {
|
|
|
23
23
|
forward?: boolean;
|
|
24
24
|
}
|
|
25
25
|
type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
|
|
26
|
-
type NormalizedEvent<E, T = any> = E & {
|
|
27
|
-
readonly type: string;
|
|
28
|
-
readonly target: T;
|
|
29
|
-
readonly isDefaultPrevented: () => boolean;
|
|
30
|
-
readonly preventDefault: () => void;
|
|
31
|
-
readonly isPropagationStopped: () => boolean;
|
|
32
|
-
readonly stopPropagation: () => void;
|
|
33
|
-
readonly isImmediatePropagationStopped: () => boolean;
|
|
34
|
-
readonly stopImmediatePropagation: () => void;
|
|
35
|
-
};
|
|
36
|
-
type MappedEvent<T extends {}, K extends string> = K extends keyof T ? T[K] : any;
|
|
37
|
-
interface NativeEventMap {
|
|
38
|
-
beforepaste: Event;
|
|
39
|
-
blur: FocusEvent;
|
|
40
|
-
beforeinput: InputEvent;
|
|
41
|
-
click: MouseEvent;
|
|
42
|
-
compositionend: Event;
|
|
43
|
-
compositionstart: Event;
|
|
44
|
-
compositionupdate: Event;
|
|
45
|
-
contextmenu: PointerEvent;
|
|
46
|
-
copy: ClipboardEvent;
|
|
47
|
-
cut: ClipboardEvent;
|
|
48
|
-
dblclick: MouseEvent;
|
|
49
|
-
drag: DragEvent;
|
|
50
|
-
dragdrop: DragEvent;
|
|
51
|
-
dragend: DragEvent;
|
|
52
|
-
draggesture: DragEvent;
|
|
53
|
-
dragover: DragEvent;
|
|
54
|
-
dragstart: DragEvent;
|
|
55
|
-
drop: DragEvent;
|
|
56
|
-
focus: FocusEvent;
|
|
57
|
-
focusin: FocusEvent;
|
|
58
|
-
focusout: FocusEvent;
|
|
59
|
-
input: InputEvent;
|
|
60
|
-
keydown: KeyboardEvent;
|
|
61
|
-
keypress: KeyboardEvent;
|
|
62
|
-
keyup: KeyboardEvent;
|
|
63
|
-
mousedown: MouseEvent;
|
|
64
|
-
mouseenter: MouseEvent;
|
|
65
|
-
mouseleave: MouseEvent;
|
|
66
|
-
mousemove: MouseEvent;
|
|
67
|
-
mouseout: MouseEvent;
|
|
68
|
-
mouseover: MouseEvent;
|
|
69
|
-
mouseup: MouseEvent;
|
|
70
|
-
paste: ClipboardEvent;
|
|
71
|
-
selectionchange: Event;
|
|
72
|
-
submit: Event;
|
|
73
|
-
touchend: TouchEvent;
|
|
74
|
-
touchmove: TouchEvent;
|
|
75
|
-
touchstart: TouchEvent;
|
|
76
|
-
touchcancel: TouchEvent;
|
|
77
|
-
wheel: WheelEvent;
|
|
78
|
-
}
|
|
79
|
-
type EditorEvent<T> = NormalizedEvent<T>;
|
|
80
|
-
interface EventDispatcherSettings {
|
|
81
|
-
scope?: any;
|
|
82
|
-
toggleEvent?: (name: string, state: boolean) => void | boolean;
|
|
83
|
-
beforeFire?: <T>(args: EditorEvent<T>) => void;
|
|
84
|
-
}
|
|
85
|
-
interface EventDispatcherConstructor<T extends {}> {
|
|
86
|
-
readonly prototype: EventDispatcher<T>;
|
|
87
|
-
new (settings?: EventDispatcherSettings): EventDispatcher<T>;
|
|
88
|
-
isNative: (name: string) => boolean;
|
|
89
|
-
}
|
|
90
|
-
declare class EventDispatcher<T extends {}> {
|
|
91
|
-
static isNative(name: string): boolean;
|
|
92
|
-
private readonly settings;
|
|
93
|
-
private readonly scope;
|
|
94
|
-
private readonly toggleEvent;
|
|
95
|
-
private bindings;
|
|
96
|
-
constructor(settings?: EventDispatcherSettings);
|
|
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>;
|
|
99
|
-
on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void | boolean), prepend?: boolean, extra?: {}): this;
|
|
100
|
-
off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
|
|
101
|
-
once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
|
|
102
|
-
has(name: string): boolean;
|
|
103
|
-
}
|
|
104
|
-
type UndoLevelType = 'fragmented' | 'complete';
|
|
105
|
-
interface BaseUndoLevel {
|
|
106
|
-
type: UndoLevelType;
|
|
107
|
-
bookmark: Bookmark | null;
|
|
108
|
-
beforeBookmark: Bookmark | null;
|
|
109
|
-
}
|
|
110
|
-
interface FragmentedUndoLevel extends BaseUndoLevel {
|
|
111
|
-
type: 'fragmented';
|
|
112
|
-
fragments: string[];
|
|
113
|
-
content: '';
|
|
114
|
-
}
|
|
115
|
-
interface CompleteUndoLevel extends BaseUndoLevel {
|
|
116
|
-
type: 'complete';
|
|
117
|
-
fragments: null;
|
|
118
|
-
content: string;
|
|
119
|
-
}
|
|
120
|
-
type NewUndoLevel = CompleteUndoLevel | FragmentedUndoLevel;
|
|
121
|
-
type UndoLevel = NewUndoLevel & {
|
|
122
|
-
bookmark: Bookmark;
|
|
123
|
-
};
|
|
124
|
-
interface UndoManager {
|
|
125
|
-
data: UndoLevel[];
|
|
126
|
-
typing: boolean;
|
|
127
|
-
add: (level?: Partial<UndoLevel>, event?: EditorEvent<any>) => UndoLevel | null;
|
|
128
|
-
dispatchChange: () => void;
|
|
129
|
-
beforeChange: () => void;
|
|
130
|
-
undo: () => UndoLevel | undefined;
|
|
131
|
-
redo: () => UndoLevel | undefined;
|
|
132
|
-
clear: () => void;
|
|
133
|
-
reset: () => void;
|
|
134
|
-
hasUndo: () => boolean;
|
|
135
|
-
hasRedo: () => boolean;
|
|
136
|
-
transact: (callback: () => void) => UndoLevel | null;
|
|
137
|
-
ignore: (callback: () => void) => void;
|
|
138
|
-
extra: (callback1: () => void, callback2: () => void) => void;
|
|
139
|
-
}
|
|
140
26
|
type SchemaType = 'html4' | 'html5' | 'html5-strict';
|
|
141
27
|
interface ElementSettings {
|
|
142
28
|
block_elements?: string;
|
|
@@ -341,6 +227,35 @@ interface BlobInfoImagePair {
|
|
|
341
227
|
image: HTMLImageElement;
|
|
342
228
|
blobInfo: BlobInfo;
|
|
343
229
|
}
|
|
230
|
+
interface UrlObject {
|
|
231
|
+
prefix: string;
|
|
232
|
+
resource: string;
|
|
233
|
+
suffix: string;
|
|
234
|
+
}
|
|
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>;
|
|
250
|
+
}
|
|
251
|
+
type LicenseKeyManagerAddon = AddOnConstructor<LicenseKeyManager>;
|
|
252
|
+
interface ValidateData {
|
|
253
|
+
plugin?: string;
|
|
254
|
+
[key: string]: any;
|
|
255
|
+
}
|
|
256
|
+
interface LicenseKeyManager {
|
|
257
|
+
readonly validate: (data: ValidateData) => Promise<boolean>;
|
|
258
|
+
}
|
|
344
259
|
declare class NodeChange {
|
|
345
260
|
private readonly editor;
|
|
346
261
|
private lastPath;
|
|
@@ -354,6 +269,120 @@ interface SelectionOverrides {
|
|
|
354
269
|
hideFakeCaret: () => void;
|
|
355
270
|
destroy: () => void;
|
|
356
271
|
}
|
|
272
|
+
type NormalizedEvent<E, T = any> = E & {
|
|
273
|
+
readonly type: string;
|
|
274
|
+
readonly target: T;
|
|
275
|
+
readonly isDefaultPrevented: () => boolean;
|
|
276
|
+
readonly preventDefault: () => void;
|
|
277
|
+
readonly isPropagationStopped: () => boolean;
|
|
278
|
+
readonly stopPropagation: () => void;
|
|
279
|
+
readonly isImmediatePropagationStopped: () => boolean;
|
|
280
|
+
readonly stopImmediatePropagation: () => void;
|
|
281
|
+
};
|
|
282
|
+
type MappedEvent<T extends {}, K extends string> = K extends keyof T ? T[K] : any;
|
|
283
|
+
interface NativeEventMap {
|
|
284
|
+
beforepaste: Event;
|
|
285
|
+
blur: FocusEvent;
|
|
286
|
+
beforeinput: InputEvent;
|
|
287
|
+
click: MouseEvent;
|
|
288
|
+
compositionend: Event;
|
|
289
|
+
compositionstart: Event;
|
|
290
|
+
compositionupdate: Event;
|
|
291
|
+
contextmenu: PointerEvent;
|
|
292
|
+
copy: ClipboardEvent;
|
|
293
|
+
cut: ClipboardEvent;
|
|
294
|
+
dblclick: MouseEvent;
|
|
295
|
+
drag: DragEvent;
|
|
296
|
+
dragdrop: DragEvent;
|
|
297
|
+
dragend: DragEvent;
|
|
298
|
+
draggesture: DragEvent;
|
|
299
|
+
dragover: DragEvent;
|
|
300
|
+
dragstart: DragEvent;
|
|
301
|
+
drop: DragEvent;
|
|
302
|
+
focus: FocusEvent;
|
|
303
|
+
focusin: FocusEvent;
|
|
304
|
+
focusout: FocusEvent;
|
|
305
|
+
input: InputEvent;
|
|
306
|
+
keydown: KeyboardEvent;
|
|
307
|
+
keypress: KeyboardEvent;
|
|
308
|
+
keyup: KeyboardEvent;
|
|
309
|
+
mousedown: MouseEvent;
|
|
310
|
+
mouseenter: MouseEvent;
|
|
311
|
+
mouseleave: MouseEvent;
|
|
312
|
+
mousemove: MouseEvent;
|
|
313
|
+
mouseout: MouseEvent;
|
|
314
|
+
mouseover: MouseEvent;
|
|
315
|
+
mouseup: MouseEvent;
|
|
316
|
+
paste: ClipboardEvent;
|
|
317
|
+
selectionchange: Event;
|
|
318
|
+
submit: Event;
|
|
319
|
+
touchend: TouchEvent;
|
|
320
|
+
touchmove: TouchEvent;
|
|
321
|
+
touchstart: TouchEvent;
|
|
322
|
+
touchcancel: TouchEvent;
|
|
323
|
+
wheel: WheelEvent;
|
|
324
|
+
}
|
|
325
|
+
type EditorEvent<T> = NormalizedEvent<T>;
|
|
326
|
+
interface EventDispatcherSettings {
|
|
327
|
+
scope?: any;
|
|
328
|
+
toggleEvent?: (name: string, state: boolean) => void | boolean;
|
|
329
|
+
beforeFire?: <T>(args: EditorEvent<T>) => void;
|
|
330
|
+
}
|
|
331
|
+
interface EventDispatcherConstructor<T extends {}> {
|
|
332
|
+
readonly prototype: EventDispatcher<T>;
|
|
333
|
+
new (settings?: EventDispatcherSettings): EventDispatcher<T>;
|
|
334
|
+
isNative: (name: string) => boolean;
|
|
335
|
+
}
|
|
336
|
+
declare class EventDispatcher<T extends {}> {
|
|
337
|
+
static isNative(name: string): boolean;
|
|
338
|
+
private readonly settings;
|
|
339
|
+
private readonly scope;
|
|
340
|
+
private readonly toggleEvent;
|
|
341
|
+
private bindings;
|
|
342
|
+
constructor(settings?: EventDispatcherSettings);
|
|
343
|
+
fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
|
|
344
|
+
dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
|
|
345
|
+
on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void | boolean), prepend?: boolean, extra?: {}): this;
|
|
346
|
+
off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
|
|
347
|
+
once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
|
|
348
|
+
has(name: string): boolean;
|
|
349
|
+
}
|
|
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;
|
|
369
|
+
};
|
|
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;
|
|
385
|
+
}
|
|
357
386
|
interface Quirks {
|
|
358
387
|
refreshContentEditable(): void;
|
|
359
388
|
isHidden(): boolean;
|
|
@@ -650,6 +679,7 @@ interface TextAreaSpec extends FormComponentWithLabelSpec {
|
|
|
650
679
|
maximized?: boolean;
|
|
651
680
|
enabled?: boolean;
|
|
652
681
|
context?: string;
|
|
682
|
+
spellcheck?: boolean;
|
|
653
683
|
}
|
|
654
684
|
interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
|
|
655
685
|
enabled?: boolean;
|
|
@@ -879,6 +909,7 @@ type ColumnTypes$1 = number | 'auto';
|
|
|
879
909
|
interface ToolbarSplitButtonSpec {
|
|
880
910
|
type?: 'splitbutton';
|
|
881
911
|
tooltip?: string;
|
|
912
|
+
chevronTooltip?: string;
|
|
882
913
|
icon?: string;
|
|
883
914
|
text?: string;
|
|
884
915
|
select?: SelectPredicate;
|
|
@@ -1508,6 +1539,7 @@ interface DomParser {
|
|
|
1508
1539
|
interface StyleSheetLoaderSettings {
|
|
1509
1540
|
maxLoadTime?: number;
|
|
1510
1541
|
contentCssCors?: boolean;
|
|
1542
|
+
crossOrigin?: (url: string) => string | undefined;
|
|
1511
1543
|
referrerPolicy?: ReferrerPolicy;
|
|
1512
1544
|
}
|
|
1513
1545
|
interface StyleSheetLoader {
|
|
@@ -1519,6 +1551,7 @@ interface StyleSheetLoader {
|
|
|
1519
1551
|
unloadAll: (urls: string[]) => void;
|
|
1520
1552
|
_setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
|
|
1521
1553
|
_setContentCssCors: (contentCssCors: boolean) => void;
|
|
1554
|
+
_setCrossOrigin: (crossOrigin: (url: string) => string | undefined) => void;
|
|
1522
1555
|
}
|
|
1523
1556
|
type Registry = Registry$1;
|
|
1524
1557
|
interface EditorUiApi {
|
|
@@ -1907,6 +1940,7 @@ interface ToolbarGroup {
|
|
|
1907
1940
|
}
|
|
1908
1941
|
type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
|
|
1909
1942
|
type ToolbarLocation = 'top' | 'bottom' | 'auto';
|
|
1943
|
+
type CrossOrigin = (url: string, resourceType: 'script' | 'stylesheet') => 'anonymous' | 'use-credentials' | undefined;
|
|
1910
1944
|
interface BaseEditorOptions {
|
|
1911
1945
|
a11y_advanced_options?: boolean;
|
|
1912
1946
|
add_form_submit_trigger?: boolean;
|
|
@@ -1971,6 +2005,7 @@ interface BaseEditorOptions {
|
|
|
1971
2005
|
extended_mathml_elements?: string[];
|
|
1972
2006
|
extended_valid_elements?: string;
|
|
1973
2007
|
event_root?: string;
|
|
2008
|
+
fetch_users?: (userIds: string[]) => Promise<ExpectedUser[]>;
|
|
1974
2009
|
file_picker_callback?: FilePickerCallback;
|
|
1975
2010
|
file_picker_types?: string;
|
|
1976
2011
|
file_picker_validator_handler?: FilePickerValidationCallback;
|
|
@@ -2021,6 +2056,7 @@ interface BaseEditorOptions {
|
|
|
2021
2056
|
language_load?: boolean;
|
|
2022
2057
|
language_url?: string;
|
|
2023
2058
|
line_height_formats?: string;
|
|
2059
|
+
list_max_depth?: number;
|
|
2024
2060
|
max_height?: number;
|
|
2025
2061
|
max_width?: number;
|
|
2026
2062
|
menu?: Record<string, {
|
|
@@ -2057,6 +2093,7 @@ interface BaseEditorOptions {
|
|
|
2057
2093
|
protect?: RegExp[];
|
|
2058
2094
|
readonly?: boolean;
|
|
2059
2095
|
referrer_policy?: ReferrerPolicy;
|
|
2096
|
+
crossorigin?: CrossOrigin;
|
|
2060
2097
|
relative_urls?: boolean;
|
|
2061
2098
|
remove_script_host?: boolean;
|
|
2062
2099
|
remove_trailing_brs?: boolean;
|
|
@@ -2079,6 +2116,7 @@ interface BaseEditorOptions {
|
|
|
2079
2116
|
style_formats_merge?: boolean;
|
|
2080
2117
|
submit_patch?: boolean;
|
|
2081
2118
|
suffix?: string;
|
|
2119
|
+
user_id?: string;
|
|
2082
2120
|
table_tab_navigation?: boolean;
|
|
2083
2121
|
target?: HTMLElement;
|
|
2084
2122
|
text_patterns?: RawPattern[] | false;
|
|
@@ -2152,6 +2190,7 @@ interface EditorOptions extends NormalizedEditorOptions {
|
|
|
2152
2190
|
content_css: string[];
|
|
2153
2191
|
contextmenu: string[];
|
|
2154
2192
|
convert_unsafe_embeds: boolean;
|
|
2193
|
+
crossorigin: CrossOrigin;
|
|
2155
2194
|
custom_colors: boolean;
|
|
2156
2195
|
default_font_stack: string[];
|
|
2157
2196
|
document_base_url: string;
|
|
@@ -2212,6 +2251,7 @@ interface EditorOptions extends NormalizedEditorOptions {
|
|
|
2212
2251
|
toolbar_sticky_offset: number;
|
|
2213
2252
|
text_patterns: Pattern[];
|
|
2214
2253
|
text_patterns_lookup: DynamicPatternsLookup;
|
|
2254
|
+
user_id: string;
|
|
2215
2255
|
visual: boolean;
|
|
2216
2256
|
visual_anchor_class: string;
|
|
2217
2257
|
visual_table_class: string;
|
|
@@ -2285,6 +2325,7 @@ interface DOMUtilsSettings {
|
|
|
2285
2325
|
onSetAttrib: (event: SetAttribEvent) => void;
|
|
2286
2326
|
contentCssCors: boolean;
|
|
2287
2327
|
referrerPolicy: ReferrerPolicy;
|
|
2328
|
+
crossOrigin: (url: string, resourceType: 'script' | 'stylesheet') => string | undefined;
|
|
2288
2329
|
}
|
|
2289
2330
|
type Target = Node | Window;
|
|
2290
2331
|
type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
|
|
@@ -2557,8 +2598,8 @@ interface EditorSelection {
|
|
|
2557
2598
|
type: 'word';
|
|
2558
2599
|
}) => void;
|
|
2559
2600
|
}
|
|
2560
|
-
type EditorCommandCallback<S> = (this: S, ui: boolean, value: any) => void;
|
|
2561
|
-
type EditorCommandsCallback = (command: string, ui: boolean, value?: any) => void;
|
|
2601
|
+
type EditorCommandCallback<S> = (this: S, ui: boolean, value: any, args?: ExecCommandArgs) => void;
|
|
2602
|
+
type EditorCommandsCallback = (command: string, ui: boolean, value?: any, args?: ExecCommandArgs) => void;
|
|
2562
2603
|
interface Commands {
|
|
2563
2604
|
state: Record<string, (command: string) => boolean>;
|
|
2564
2605
|
exec: Record<string, EditorCommandsCallback>;
|
|
@@ -2685,6 +2726,7 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
|
2685
2726
|
documentBaseURL: string;
|
|
2686
2727
|
i18n: I18n;
|
|
2687
2728
|
suffix: string;
|
|
2729
|
+
pageUid: string;
|
|
2688
2730
|
add(this: EditorManager, editor: Editor): Editor;
|
|
2689
2731
|
addI18n: (code: string, item: Record<string, string>) => void;
|
|
2690
2732
|
createEditor(this: EditorManager, id: string, options: RawEditorOptions): Editor;
|
|
@@ -2701,6 +2743,7 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
|
2701
2743
|
translate: (text: Untranslated) => TranslatedString;
|
|
2702
2744
|
triggerSave: () => void;
|
|
2703
2745
|
_setBaseUrl(this: EditorManager, baseUrl: string): void;
|
|
2746
|
+
_addLicenseKeyManager(this: EditorManager, addOn: LicenseKeyManagerAddon): void;
|
|
2704
2747
|
}
|
|
2705
2748
|
interface EditorObservable extends Observable<EditorEventMap> {
|
|
2706
2749
|
bindPendingEventDelegates(this: Editor): void;
|
|
@@ -2878,9 +2921,9 @@ interface EditorConstructor {
|
|
|
2878
2921
|
new (id: string, options: RawEditorOptions, editorManager: EditorManager): Editor;
|
|
2879
2922
|
}
|
|
2880
2923
|
declare class Editor implements EditorObservable {
|
|
2881
|
-
documentBaseUrl: string;
|
|
2882
2924
|
baseUri: URI;
|
|
2883
2925
|
id: string;
|
|
2926
|
+
editorUid: string;
|
|
2884
2927
|
plugins: Record<string, Plugin>;
|
|
2885
2928
|
documentBaseURI: URI;
|
|
2886
2929
|
baseURI: URI;
|
|
@@ -2890,6 +2933,7 @@ declare class Editor implements EditorObservable {
|
|
|
2890
2933
|
mode: EditorMode;
|
|
2891
2934
|
options: Options;
|
|
2892
2935
|
editorUpload: EditorUpload;
|
|
2936
|
+
userLookup: UserLookup;
|
|
2893
2937
|
shortcuts: Shortcuts;
|
|
2894
2938
|
loadedCSS: Record<string, any>;
|
|
2895
2939
|
editorCommands: EditorCommands;
|
|
@@ -2935,6 +2979,7 @@ declare class Editor implements EditorObservable {
|
|
|
2935
2979
|
model: Model;
|
|
2936
2980
|
undoManager: UndoManager;
|
|
2937
2981
|
windowManager: WindowManager;
|
|
2982
|
+
licenseKeyManager: LicenseKeyManager;
|
|
2938
2983
|
_beforeUnload: (() => void) | undefined;
|
|
2939
2984
|
_eventDispatcher: EventDispatcher<NativeEventMap> | undefined;
|
|
2940
2985
|
_nodeChangeDispatcher: NodeChange;
|
|
@@ -2980,11 +3025,9 @@ declare class Editor implements EditorObservable {
|
|
|
2980
3025
|
hide(): void;
|
|
2981
3026
|
isHidden(): boolean;
|
|
2982
3027
|
setProgressState(state: boolean, time?: number): void;
|
|
2983
|
-
load(args?: Partial<SetContentArgs>):
|
|
3028
|
+
load(args?: Partial<SetContentArgs>): void;
|
|
2984
3029
|
save(args?: Partial<GetContentArgs>): string;
|
|
2985
|
-
setContent(content: string, args?: Partial<SetContentArgs>):
|
|
2986
|
-
setContent(content: AstNode, args?: Partial<SetContentArgs>): AstNode;
|
|
2987
|
-
setContent(content: Content, args?: Partial<SetContentArgs>): Content;
|
|
3030
|
+
setContent(content: string | AstNode, args?: Partial<SetContentArgs>): void;
|
|
2988
3031
|
getContent(args: {
|
|
2989
3032
|
format: 'tree';
|
|
2990
3033
|
} & Partial<GetContentArgs>): AstNode;
|
|
@@ -3008,26 +3051,20 @@ declare class Editor implements EditorObservable {
|
|
|
3008
3051
|
uploadImages(): Promise<UploadResult$1[]>;
|
|
3009
3052
|
_scanForImages(): Promise<BlobInfoImagePair[]>;
|
|
3010
3053
|
}
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3054
|
+
type UserId = string;
|
|
3055
|
+
interface User {
|
|
3056
|
+
id: UserId;
|
|
3057
|
+
name: string;
|
|
3058
|
+
avatar: string;
|
|
3059
|
+
custom?: Record<string, any>;
|
|
3015
3060
|
}
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
}>;
|
|
3024
|
-
get: (name: string) => AddOnConstructor<T> | undefined;
|
|
3025
|
-
requireLangPack: (name: string, languages?: string) => void;
|
|
3026
|
-
add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
|
|
3027
|
-
remove: (name: string) => void;
|
|
3028
|
-
createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
|
|
3029
|
-
load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
|
|
3030
|
-
waitFor: (name: string, state?: WaitState) => Promise<void>;
|
|
3061
|
+
interface ExpectedUser {
|
|
3062
|
+
id: UserId;
|
|
3063
|
+
[key: string]: any;
|
|
3064
|
+
}
|
|
3065
|
+
interface UserLookup {
|
|
3066
|
+
userId: UserId;
|
|
3067
|
+
fetchUsers: (userIds: UserId[]) => Record<UserId, Promise<User>>;
|
|
3031
3068
|
}
|
|
3032
3069
|
interface RangeUtils {
|
|
3033
3070
|
walk: (rng: Range, callback: (nodes: Node[]) => void) => void;
|
|
@@ -3039,6 +3076,7 @@ interface RangeUtils {
|
|
|
3039
3076
|
}
|
|
3040
3077
|
interface ScriptLoaderSettings {
|
|
3041
3078
|
referrerPolicy?: ReferrerPolicy;
|
|
3079
|
+
crossOrigin?: (url: string) => string | undefined;
|
|
3042
3080
|
}
|
|
3043
3081
|
interface ScriptLoaderConstructor {
|
|
3044
3082
|
readonly prototype: ScriptLoader;
|
|
@@ -3055,6 +3093,7 @@ declare class ScriptLoader {
|
|
|
3055
3093
|
private loading;
|
|
3056
3094
|
constructor(settings?: ScriptLoaderSettings);
|
|
3057
3095
|
_setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
|
|
3096
|
+
_setCrossOrigin(crossOrigin: (url: string) => string | undefined): void;
|
|
3058
3097
|
loadScript(url: string): Promise<void>;
|
|
3059
3098
|
isDone(url: string): boolean;
|
|
3060
3099
|
markDone(url: string): void;
|
|
@@ -3348,4 +3387,4 @@ interface TinyMCE extends EditorManager {
|
|
|
3348
3387
|
_addCacheSuffix: Tools['_addCacheSuffix'];
|
|
3349
3388
|
}
|
|
3350
3389
|
declare const tinymce: TinyMCE;
|
|
3351
|
-
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, TextPatterns_d as TextPatterns, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, tinymce as default };
|
|
3390
|
+
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, ExpectedUser, 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, TextPatterns_d as TextPatterns, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, User, VK, WindowManager, Writer, WriterSettings, tinymce as default };
|