tinymce-rails 7.5.1 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +1803 -1597
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/models/dom/model.js +2 -2
  6. data/vendor/assets/javascripts/tinymce/plugins/accordion/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +2 -2
  8. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +2 -2
  19. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  22. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +2 -2
  29. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
  36. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
  37. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  39. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
  41. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
  42. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
  44. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
  46. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
  47. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  49. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.js +1 -1
  50. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  51. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
  52. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.js +1 -1
  53. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  54. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -1
  55. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.css +1 -1
  56. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.css +1 -1
  57. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
  58. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  59. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.js +1 -1
  60. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  61. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -1
  62. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.js +1 -1
  63. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  64. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.css +1 -1
  65. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -1
  66. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
  67. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  68. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
  69. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  70. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -1
  71. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
  72. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  73. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +68 -68
  74. data/vendor/assets/javascripts/tinymce/tinymce.d.ts +51 -15
  75. data/vendor/assets/javascripts/tinymce/tinymce.js +57 -57
  76. metadata +5 -5
@@ -1093,30 +1093,59 @@ interface ContextFormButtonInstanceApi extends BaseToolbarButtonInstanceApi {
1093
1093
  }
1094
1094
  interface ContextFormToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
1095
1095
  }
1096
- interface ContextFormButtonSpec extends BaseToolbarButtonSpec<ContextFormButtonInstanceApi> {
1096
+ interface ContextFormButtonSpec<T> extends BaseToolbarButtonSpec<ContextFormButtonInstanceApi> {
1097
1097
  type?: 'contextformbutton';
1098
1098
  primary?: boolean;
1099
- onAction: (formApi: ContextFormInstanceApi, api: ContextFormButtonInstanceApi) => void;
1099
+ align?: 'start' | 'end';
1100
+ onAction: (formApi: ContextFormInstanceApi<T>, api: ContextFormButtonInstanceApi) => void;
1100
1101
  }
1101
- interface ContextFormToggleButtonSpec extends BaseToolbarToggleButtonSpec<ContextFormToggleButtonInstanceApi> {
1102
+ interface ContextFormToggleButtonSpec<T> extends BaseToolbarToggleButtonSpec<ContextFormToggleButtonInstanceApi> {
1102
1103
  type?: 'contextformtogglebutton';
1103
- onAction: (formApi: ContextFormInstanceApi, buttonApi: ContextFormToggleButtonInstanceApi) => void;
1104
1104
  primary?: boolean;
1105
+ align?: 'start' | 'end';
1106
+ onAction: (formApi: ContextFormInstanceApi<T>, buttonApi: ContextFormToggleButtonInstanceApi) => void;
1105
1107
  }
1106
- interface ContextFormInstanceApi {
1108
+ interface ContextFormInstanceApi<T> {
1109
+ setInputEnabled: (state: boolean) => void;
1110
+ isInputEnabled: () => boolean;
1107
1111
  hide: () => void;
1108
- getValue: () => string;
1112
+ back: () => void;
1113
+ getValue: () => T;
1114
+ setValue: (value: T) => void;
1109
1115
  }
1110
- interface ContextFormSpec extends ContextBarSpec {
1111
- type?: 'contextform';
1112
- initValue?: () => string;
1116
+ interface SizeData {
1117
+ width: string;
1118
+ height: string;
1119
+ }
1120
+ interface BaseContextFormSpec<T> extends ContextBarSpec {
1121
+ initValue?: () => T;
1113
1122
  label?: string;
1114
1123
  launch?: ContextFormLaunchButtonApi | ContextFormLaunchToggleButtonSpec;
1115
- commands: Array<ContextFormToggleButtonSpec | ContextFormButtonSpec>;
1124
+ commands: Array<ContextFormToggleButtonSpec<T> | ContextFormButtonSpec<T>>;
1125
+ onInput?: (api: ContextFormInstanceApi<T>) => void;
1126
+ onSetup?: (api: ContextFormInstanceApi<T>) => (api: ContextFormInstanceApi<T>) => void;
1127
+ }
1128
+ interface ContextInputFormSpec extends BaseContextFormSpec<string> {
1129
+ type?: 'contextform';
1130
+ placeholder?: string;
1131
+ }
1132
+ interface ContextSliderFormSpec extends BaseContextFormSpec<number> {
1133
+ type: 'contextsliderform';
1134
+ min?: () => number;
1135
+ max?: () => number;
1136
+ }
1137
+ interface ContextSizeInputFormSpec extends BaseContextFormSpec<SizeData> {
1138
+ type: 'contextsizeinputform';
1139
+ }
1140
+ type ContextFormSpec = ContextInputFormSpec | ContextSliderFormSpec | ContextSizeInputFormSpec;
1141
+ interface ToolbarGroupSpec {
1142
+ name?: string;
1143
+ label?: string;
1144
+ items: string[];
1116
1145
  }
1117
1146
  interface ContextToolbarSpec extends ContextBarSpec {
1118
1147
  type?: 'contexttoolbar';
1119
- items: string;
1148
+ items: string | ToolbarGroupSpec[];
1120
1149
  }
1121
1150
  type PublicDialog_d_AlertBannerSpec = AlertBannerSpec;
1122
1151
  type PublicDialog_d_BarSpec = BarSpec;
@@ -1177,10 +1206,10 @@ type PublicInlineContent_d_AutocompleterInstanceApi = AutocompleterInstanceApi;
1177
1206
  type PublicInlineContent_d_ContextPosition = ContextPosition;
1178
1207
  type PublicInlineContent_d_ContextScope = ContextScope;
1179
1208
  type PublicInlineContent_d_ContextFormSpec = ContextFormSpec;
1180
- type PublicInlineContent_d_ContextFormInstanceApi = ContextFormInstanceApi;
1181
- type PublicInlineContent_d_ContextFormButtonSpec = ContextFormButtonSpec;
1209
+ type PublicInlineContent_d_ContextFormInstanceApi<T> = ContextFormInstanceApi<T>;
1210
+ type PublicInlineContent_d_ContextFormButtonSpec<T> = ContextFormButtonSpec<T>;
1182
1211
  type PublicInlineContent_d_ContextFormButtonInstanceApi = ContextFormButtonInstanceApi;
1183
- type PublicInlineContent_d_ContextFormToggleButtonSpec = ContextFormToggleButtonSpec;
1212
+ type PublicInlineContent_d_ContextFormToggleButtonSpec<T> = ContextFormToggleButtonSpec<T>;
1184
1213
  type PublicInlineContent_d_ContextFormToggleButtonInstanceApi = ContextFormToggleButtonInstanceApi;
1185
1214
  type PublicInlineContent_d_ContextToolbarSpec = ContextToolbarSpec;
1186
1215
  type PublicInlineContent_d_SeparatorItemSpec = SeparatorItemSpec;
@@ -1620,6 +1649,9 @@ interface BeforeOpenNotificationEvent {
1620
1649
  interface OpenNotificationEvent {
1621
1650
  notification: NotificationApi;
1622
1651
  }
1652
+ interface DisabledStateChangeEvent {
1653
+ readonly state: boolean;
1654
+ }
1623
1655
  interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
1624
1656
  'activate': {
1625
1657
  relatedTarget: Editor | null;
@@ -1763,10 +1795,11 @@ type EventTypes_d_TableEventData = TableEventData;
1763
1795
  type EventTypes_d_TableModifiedEvent = TableModifiedEvent;
1764
1796
  type EventTypes_d_BeforeOpenNotificationEvent = BeforeOpenNotificationEvent;
1765
1797
  type EventTypes_d_OpenNotificationEvent = OpenNotificationEvent;
1798
+ type EventTypes_d_DisabledStateChangeEvent = DisabledStateChangeEvent;
1766
1799
  type EventTypes_d_EditorEventMap = EditorEventMap;
1767
1800
  type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
1768
1801
  declare namespace EventTypes_d {
1769
- export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_BeforeGetContentEvent as BeforeGetContentEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_BeforeSetContentEvent as BeforeSetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_SaveContentEvent as SaveContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_FormatEvent as FormatEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_ChangeEvent as ChangeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_PreProcessEvent as PreProcessEvent, EventTypes_d_PostProcessEvent as PostProcessEvent, EventTypes_d_PastePlainTextToggleEvent as PastePlainTextToggleEvent, EventTypes_d_PastePreProcessEvent as PastePreProcessEvent, EventTypes_d_PastePostProcessEvent as PastePostProcessEvent, EventTypes_d_EditableRootStateChangeEvent as EditableRootStateChangeEvent, EventTypes_d_NewTableRowEvent as NewTableRowEvent, EventTypes_d_NewTableCellEvent as NewTableCellEvent, EventTypes_d_TableEventData as TableEventData, EventTypes_d_TableModifiedEvent as TableModifiedEvent, EventTypes_d_BeforeOpenNotificationEvent as BeforeOpenNotificationEvent, EventTypes_d_OpenNotificationEvent as OpenNotificationEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
1802
+ export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_BeforeGetContentEvent as BeforeGetContentEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_BeforeSetContentEvent as BeforeSetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_SaveContentEvent as SaveContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_FormatEvent as FormatEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_ChangeEvent as ChangeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_PreProcessEvent as PreProcessEvent, EventTypes_d_PostProcessEvent as PostProcessEvent, EventTypes_d_PastePlainTextToggleEvent as PastePlainTextToggleEvent, EventTypes_d_PastePreProcessEvent as PastePreProcessEvent, EventTypes_d_PastePostProcessEvent as PastePostProcessEvent, EventTypes_d_EditableRootStateChangeEvent as EditableRootStateChangeEvent, EventTypes_d_NewTableRowEvent as NewTableRowEvent, EventTypes_d_NewTableCellEvent as NewTableCellEvent, EventTypes_d_TableEventData as TableEventData, EventTypes_d_TableModifiedEvent as TableModifiedEvent, EventTypes_d_BeforeOpenNotificationEvent as BeforeOpenNotificationEvent, EventTypes_d_OpenNotificationEvent as OpenNotificationEvent, EventTypes_d_DisabledStateChangeEvent as DisabledStateChangeEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
1770
1803
  }
1771
1804
  type Format_d_Formats = Formats;
1772
1805
  type Format_d_Format = Format;
@@ -1835,6 +1868,7 @@ type URLConverter = (url: string, name: string, elm?: string | Element) => strin
1835
1868
  type URLConverterCallback = (url: string, node: Node | string | undefined, on_save: boolean, name: string) => string;
1836
1869
  interface ToolbarGroup {
1837
1870
  name?: string;
1871
+ label?: string;
1838
1872
  items: string[];
1839
1873
  }
1840
1874
  type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
@@ -2045,6 +2079,7 @@ interface BaseEditorOptions {
2045
2079
  width?: number | string;
2046
2080
  xss_sanitization?: boolean;
2047
2081
  license_key?: string;
2082
+ disabled?: boolean;
2048
2083
  disable_nodechange?: boolean;
2049
2084
  forced_plugins?: string | string[];
2050
2085
  plugin_base_urls?: Record<string, string>;
@@ -2145,6 +2180,7 @@ interface EditorOptions extends NormalizedEditorOptions {
2145
2180
  visual_table_class: string;
2146
2181
  width: number | string;
2147
2182
  xss_sanitization: boolean;
2183
+ disabled: boolean;
2148
2184
  }
2149
2185
  type StyleMap = Record<string, string | number>;
2150
2186
  interface StylesSettings {