]> BookStack Code Mirror - bookstack/blobdiff - public/libs/tinymce/tinymce.d.ts
WYSIWYG: Updated TinyMCE from 6.5.1 to 6.7.2
[bookstack] / public / libs / tinymce / tinymce.d.ts
index f6fd89c3e3dc4882c34be01cac048a6095f3b7cd..c2db8964bb3f257c905d3f10c0939b9144ea0fd9 100644 (file)
@@ -101,22 +101,19 @@ declare class EventDispatcher<T extends {}> {
     once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
     has(name: string): boolean;
 }
-declare const enum UndoLevelType {
-    Fragmented = "fragmented",
-    Complete = "complete"
-}
+type UndoLevelType = 'fragmented' | 'complete';
 interface BaseUndoLevel {
     type: UndoLevelType;
     bookmark: Bookmark | null;
     beforeBookmark: Bookmark | null;
 }
 interface FragmentedUndoLevel extends BaseUndoLevel {
-    type: UndoLevelType.Fragmented;
+    type: 'fragmented';
     fragments: string[];
     content: '';
 }
 interface CompleteUndoLevel extends BaseUndoLevel {
-    type: UndoLevelType.Complete;
+    type: 'complete';
     fragments: null;
     content: string;
 }
@@ -548,7 +545,9 @@ interface HtmlPanelSpec {
 }
 interface IframeSpec extends FormComponentWithLabelSpec {
     type: 'iframe';
+    border?: boolean;
     sandboxed?: boolean;
+    streamContent?: boolean;
     transparent?: boolean;
 }
 interface ImagePreviewSpec extends FormComponentSpec {
@@ -562,10 +561,12 @@ interface InputSpec extends FormComponentWithLabelSpec {
     maximized?: boolean;
     enabled?: boolean;
 }
+type Alignment = 'start' | 'center' | 'end';
 interface LabelSpec {
     type: 'label';
     label: string;
     items: BodyComponentSpec[];
+    align?: Alignment;
 }
 interface ListBoxSingleItemSpec {
     text: string;
@@ -964,7 +965,7 @@ interface DialogSpec<T extends DialogData> {
     title: string;
     size?: DialogSize;
     body: TabPanelSpec | PanelSpec;
-    buttons: DialogFooterButtonSpec[];
+    buttons?: DialogFooterButtonSpec[];
     initialData?: Partial<T>;
     onAction?: DialogActionHandler<T>;
     onChange?: DialogChangeHandler<T>;
@@ -1373,6 +1374,7 @@ interface DomParserSettings {
     forced_root_block?: boolean | string;
     forced_root_block_attrs?: Record<string, string>;
     inline_styles?: boolean;
+    pad_empty_with_br?: boolean;
     preserve_cdata?: boolean;
     remove_trailing_brs?: boolean;
     root_name?: string;
@@ -1420,8 +1422,9 @@ declare namespace Ui_d {
     export { Ui_d_Registry as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicView_d as View, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, };
 }
 interface WindowParams {
-    readonly inline?: 'cursor' | 'toolbar';
+    readonly inline?: 'cursor' | 'toolbar' | 'bottom';
     readonly ariaAttrs?: boolean;
+    readonly persistent?: boolean;
 }
 type InstanceApi<T extends DialogData> = UrlDialogInstanceApi | DialogInstanceApi<T>;
 interface WindowManagerImpl {
@@ -1859,6 +1862,7 @@ interface BaseEditorOptions {
     formats?: Formats;
     format_noneditable_selector?: string;
     height?: number | string;
+    help_accessibility?: boolean;
     hidden_input?: boolean;
     highlight_on_focus?: boolean;
     icons?: string;
@@ -1908,6 +1912,7 @@ interface BaseEditorOptions {
     noneditable_regexp?: RegExp | RegExp[];
     nowrap?: boolean;
     object_resizing?: boolean | string;
+    pad_empty_with_br?: boolean;
     paste_as_text?: boolean;
     paste_block_drop?: boolean;
     paste_data_images?: boolean;
@@ -2056,6 +2061,7 @@ interface EditorOptions extends NormalizedEditorOptions {
     noneditable_class: string;
     noneditable_regexp: RegExp[];
     object_resizing: string;
+    pad_empty_with_br: boolean;
     paste_as_text: boolean;
     preview_styles: string;
     promotion: boolean;