tinymce-rails 7.9.1.1 → 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 +5874 -3300
- 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/notices.txt +2 -2
- 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 +181 -141
- data/vendor/assets/javascripts/tinymce/tinymce.js +3 -4
- metadata +14 -1
@@ -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;
|
@@ -1471,6 +1502,7 @@ interface DomParserSettings {
|
|
1471
1502
|
allow_html_data_urls?: boolean;
|
1472
1503
|
allow_svg_data_urls?: boolean;
|
1473
1504
|
allow_conditional_comments?: boolean;
|
1505
|
+
allow_html_in_comments?: boolean;
|
1474
1506
|
allow_html_in_named_anchor?: boolean;
|
1475
1507
|
allow_script_urls?: boolean;
|
1476
1508
|
allow_unsafe_link_target?: boolean;
|
@@ -1507,6 +1539,7 @@ interface DomParser {
|
|
1507
1539
|
interface StyleSheetLoaderSettings {
|
1508
1540
|
maxLoadTime?: number;
|
1509
1541
|
contentCssCors?: boolean;
|
1542
|
+
crossOrigin?: (url: string) => string | undefined;
|
1510
1543
|
referrerPolicy?: ReferrerPolicy;
|
1511
1544
|
}
|
1512
1545
|
interface StyleSheetLoader {
|
@@ -1518,6 +1551,7 @@ interface StyleSheetLoader {
|
|
1518
1551
|
unloadAll: (urls: string[]) => void;
|
1519
1552
|
_setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
|
1520
1553
|
_setContentCssCors: (contentCssCors: boolean) => void;
|
1554
|
+
_setCrossOrigin: (crossOrigin: (url: string) => string | undefined) => void;
|
1521
1555
|
}
|
1522
1556
|
type Registry = Registry$1;
|
1523
1557
|
interface EditorUiApi {
|
@@ -1906,6 +1940,7 @@ interface ToolbarGroup {
|
|
1906
1940
|
}
|
1907
1941
|
type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
|
1908
1942
|
type ToolbarLocation = 'top' | 'bottom' | 'auto';
|
1943
|
+
type CrossOrigin = (url: string, resourceType: 'script' | 'stylesheet') => 'anonymous' | 'use-credentials' | undefined;
|
1909
1944
|
interface BaseEditorOptions {
|
1910
1945
|
a11y_advanced_options?: boolean;
|
1911
1946
|
add_form_submit_trigger?: boolean;
|
@@ -1970,6 +2005,7 @@ interface BaseEditorOptions {
|
|
1970
2005
|
extended_mathml_elements?: string[];
|
1971
2006
|
extended_valid_elements?: string;
|
1972
2007
|
event_root?: string;
|
2008
|
+
fetch_users?: (userIds: string[]) => Promise<ExpectedUser[]>;
|
1973
2009
|
file_picker_callback?: FilePickerCallback;
|
1974
2010
|
file_picker_types?: string;
|
1975
2011
|
file_picker_validator_handler?: FilePickerValidationCallback;
|
@@ -2020,6 +2056,7 @@ interface BaseEditorOptions {
|
|
2020
2056
|
language_load?: boolean;
|
2021
2057
|
language_url?: string;
|
2022
2058
|
line_height_formats?: string;
|
2059
|
+
list_max_depth?: number;
|
2023
2060
|
max_height?: number;
|
2024
2061
|
max_width?: number;
|
2025
2062
|
menu?: Record<string, {
|
@@ -2056,6 +2093,7 @@ interface BaseEditorOptions {
|
|
2056
2093
|
protect?: RegExp[];
|
2057
2094
|
readonly?: boolean;
|
2058
2095
|
referrer_policy?: ReferrerPolicy;
|
2096
|
+
crossorigin?: CrossOrigin;
|
2059
2097
|
relative_urls?: boolean;
|
2060
2098
|
remove_script_host?: boolean;
|
2061
2099
|
remove_trailing_brs?: boolean;
|
@@ -2078,6 +2116,7 @@ interface BaseEditorOptions {
|
|
2078
2116
|
style_formats_merge?: boolean;
|
2079
2117
|
submit_patch?: boolean;
|
2080
2118
|
suffix?: string;
|
2119
|
+
user_id?: string;
|
2081
2120
|
table_tab_navigation?: boolean;
|
2082
2121
|
target?: HTMLElement;
|
2083
2122
|
text_patterns?: RawPattern[] | false;
|
@@ -2151,6 +2190,7 @@ interface EditorOptions extends NormalizedEditorOptions {
|
|
2151
2190
|
content_css: string[];
|
2152
2191
|
contextmenu: string[];
|
2153
2192
|
convert_unsafe_embeds: boolean;
|
2193
|
+
crossorigin: CrossOrigin;
|
2154
2194
|
custom_colors: boolean;
|
2155
2195
|
default_font_stack: string[];
|
2156
2196
|
document_base_url: string;
|
@@ -2211,6 +2251,7 @@ interface EditorOptions extends NormalizedEditorOptions {
|
|
2211
2251
|
toolbar_sticky_offset: number;
|
2212
2252
|
text_patterns: Pattern[];
|
2213
2253
|
text_patterns_lookup: DynamicPatternsLookup;
|
2254
|
+
user_id: string;
|
2214
2255
|
visual: boolean;
|
2215
2256
|
visual_anchor_class: string;
|
2216
2257
|
visual_table_class: string;
|
@@ -2284,6 +2325,7 @@ interface DOMUtilsSettings {
|
|
2284
2325
|
onSetAttrib: (event: SetAttribEvent) => void;
|
2285
2326
|
contentCssCors: boolean;
|
2286
2327
|
referrerPolicy: ReferrerPolicy;
|
2328
|
+
crossOrigin: (url: string, resourceType: 'script' | 'stylesheet') => string | undefined;
|
2287
2329
|
}
|
2288
2330
|
type Target = Node | Window;
|
2289
2331
|
type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
|
@@ -2556,8 +2598,8 @@ interface EditorSelection {
|
|
2556
2598
|
type: 'word';
|
2557
2599
|
}) => void;
|
2558
2600
|
}
|
2559
|
-
type EditorCommandCallback<S> = (this: S, ui: boolean, value: any) => void;
|
2560
|
-
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;
|
2561
2603
|
interface Commands {
|
2562
2604
|
state: Record<string, (command: string) => boolean>;
|
2563
2605
|
exec: Record<string, EditorCommandsCallback>;
|
@@ -2684,6 +2726,7 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
2684
2726
|
documentBaseURL: string;
|
2685
2727
|
i18n: I18n;
|
2686
2728
|
suffix: string;
|
2729
|
+
pageUid: string;
|
2687
2730
|
add(this: EditorManager, editor: Editor): Editor;
|
2688
2731
|
addI18n: (code: string, item: Record<string, string>) => void;
|
2689
2732
|
createEditor(this: EditorManager, id: string, options: RawEditorOptions): Editor;
|
@@ -2700,6 +2743,7 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
2700
2743
|
translate: (text: Untranslated) => TranslatedString;
|
2701
2744
|
triggerSave: () => void;
|
2702
2745
|
_setBaseUrl(this: EditorManager, baseUrl: string): void;
|
2746
|
+
_addLicenseKeyManager(this: EditorManager, addOn: LicenseKeyManagerAddon): void;
|
2703
2747
|
}
|
2704
2748
|
interface EditorObservable extends Observable<EditorEventMap> {
|
2705
2749
|
bindPendingEventDelegates(this: Editor): void;
|
@@ -2877,9 +2921,9 @@ interface EditorConstructor {
|
|
2877
2921
|
new (id: string, options: RawEditorOptions, editorManager: EditorManager): Editor;
|
2878
2922
|
}
|
2879
2923
|
declare class Editor implements EditorObservable {
|
2880
|
-
documentBaseUrl: string;
|
2881
2924
|
baseUri: URI;
|
2882
2925
|
id: string;
|
2926
|
+
editorUid: string;
|
2883
2927
|
plugins: Record<string, Plugin>;
|
2884
2928
|
documentBaseURI: URI;
|
2885
2929
|
baseURI: URI;
|
@@ -2889,6 +2933,7 @@ declare class Editor implements EditorObservable {
|
|
2889
2933
|
mode: EditorMode;
|
2890
2934
|
options: Options;
|
2891
2935
|
editorUpload: EditorUpload;
|
2936
|
+
userLookup: UserLookup;
|
2892
2937
|
shortcuts: Shortcuts;
|
2893
2938
|
loadedCSS: Record<string, any>;
|
2894
2939
|
editorCommands: EditorCommands;
|
@@ -2934,6 +2979,7 @@ declare class Editor implements EditorObservable {
|
|
2934
2979
|
model: Model;
|
2935
2980
|
undoManager: UndoManager;
|
2936
2981
|
windowManager: WindowManager;
|
2982
|
+
licenseKeyManager: LicenseKeyManager;
|
2937
2983
|
_beforeUnload: (() => void) | undefined;
|
2938
2984
|
_eventDispatcher: EventDispatcher<NativeEventMap> | undefined;
|
2939
2985
|
_nodeChangeDispatcher: NodeChange;
|
@@ -2979,11 +3025,9 @@ declare class Editor implements EditorObservable {
|
|
2979
3025
|
hide(): void;
|
2980
3026
|
isHidden(): boolean;
|
2981
3027
|
setProgressState(state: boolean, time?: number): void;
|
2982
|
-
load(args?: Partial<SetContentArgs>):
|
3028
|
+
load(args?: Partial<SetContentArgs>): void;
|
2983
3029
|
save(args?: Partial<GetContentArgs>): string;
|
2984
|
-
setContent(content: string, args?: Partial<SetContentArgs>):
|
2985
|
-
setContent(content: AstNode, args?: Partial<SetContentArgs>): AstNode;
|
2986
|
-
setContent(content: Content, args?: Partial<SetContentArgs>): Content;
|
3030
|
+
setContent(content: string | AstNode, args?: Partial<SetContentArgs>): void;
|
2987
3031
|
getContent(args: {
|
2988
3032
|
format: 'tree';
|
2989
3033
|
} & Partial<GetContentArgs>): AstNode;
|
@@ -3007,26 +3051,20 @@ declare class Editor implements EditorObservable {
|
|
3007
3051
|
uploadImages(): Promise<UploadResult$1[]>;
|
3008
3052
|
_scanForImages(): Promise<BlobInfoImagePair[]>;
|
3009
3053
|
}
|
3010
|
-
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3054
|
+
type UserId = string;
|
3055
|
+
interface User {
|
3056
|
+
id: UserId;
|
3057
|
+
name: string;
|
3058
|
+
avatar: string;
|
3059
|
+
custom?: Record<string, any>;
|
3014
3060
|
}
|
3015
|
-
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
}>;
|
3023
|
-
get: (name: string) => AddOnConstructor<T> | undefined;
|
3024
|
-
requireLangPack: (name: string, languages?: string) => void;
|
3025
|
-
add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
|
3026
|
-
remove: (name: string) => void;
|
3027
|
-
createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
|
3028
|
-
load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
|
3029
|
-
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>>;
|
3030
3068
|
}
|
3031
3069
|
interface RangeUtils {
|
3032
3070
|
walk: (rng: Range, callback: (nodes: Node[]) => void) => void;
|
@@ -3038,6 +3076,7 @@ interface RangeUtils {
|
|
3038
3076
|
}
|
3039
3077
|
interface ScriptLoaderSettings {
|
3040
3078
|
referrerPolicy?: ReferrerPolicy;
|
3079
|
+
crossOrigin?: (url: string) => string | undefined;
|
3041
3080
|
}
|
3042
3081
|
interface ScriptLoaderConstructor {
|
3043
3082
|
readonly prototype: ScriptLoader;
|
@@ -3054,6 +3093,7 @@ declare class ScriptLoader {
|
|
3054
3093
|
private loading;
|
3055
3094
|
constructor(settings?: ScriptLoaderSettings);
|
3056
3095
|
_setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
|
3096
|
+
_setCrossOrigin(crossOrigin: (url: string) => string | undefined): void;
|
3057
3097
|
loadScript(url: string): Promise<void>;
|
3058
3098
|
isDone(url: string): boolean;
|
3059
3099
|
markDone(url: string): void;
|
@@ -3347,4 +3387,4 @@ interface TinyMCE extends EditorManager {
|
|
3347
3387
|
_addCacheSuffix: Tools['_addCacheSuffix'];
|
3348
3388
|
}
|
3349
3389
|
declare const tinymce: TinyMCE;
|
3350
|
-
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 };
|