@dangl/angular-material-shared 2.9.0-beta0036 → 2.9.0-beta0039

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 (173) hide show
  1. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs +38 -31
  2. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs.map +1 -1
  3. package/fesm2022/dangl-angular-material-shared.mjs +36 -51
  4. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  5. package/package.json +11 -10
  6. package/tinymce-assets/icons/default/icons.js +46 -9
  7. package/tinymce-assets/icons/default/icons.min.js +1 -1
  8. package/tinymce-assets/models/dom/model.js +8198 -7244
  9. package/tinymce-assets/models/dom/model.min.js +1 -4
  10. package/tinymce-assets/plugins/accordion/plugin.js +1174 -879
  11. package/tinymce-assets/plugins/accordion/plugin.min.js +1 -4
  12. package/tinymce-assets/plugins/advlist/plugin.js +412 -200
  13. package/tinymce-assets/plugins/advlist/plugin.min.js +1 -4
  14. package/tinymce-assets/plugins/anchor/plugin.js +189 -166
  15. package/tinymce-assets/plugins/anchor/plugin.min.js +1 -4
  16. package/tinymce-assets/plugins/autolink/plugin.js +310 -220
  17. package/tinymce-assets/plugins/autolink/plugin.min.js +1 -4
  18. package/tinymce-assets/plugins/autoresize/plugin.js +180 -149
  19. package/tinymce-assets/plugins/autoresize/plugin.min.js +1 -4
  20. package/tinymce-assets/plugins/autosave/plugin.js +208 -189
  21. package/tinymce-assets/plugins/autosave/plugin.min.js +1 -4
  22. package/tinymce-assets/plugins/charmap/plugin.js +905 -1566
  23. package/tinymce-assets/plugins/charmap/plugin.min.js +1 -4
  24. package/tinymce-assets/plugins/code/plugin.js +73 -61
  25. package/tinymce-assets/plugins/code/plugin.min.js +0 -3
  26. package/tinymce-assets/plugins/codesample/plugin.js +3593 -2402
  27. package/tinymce-assets/plugins/codesample/plugin.min.js +8 -3
  28. package/tinymce-assets/plugins/directionality/plugin.js +545 -304
  29. package/tinymce-assets/plugins/directionality/plugin.min.js +1 -4
  30. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +0 -2
  31. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +0 -1
  32. package/tinymce-assets/plugins/emoticons/plugin.js +702 -488
  33. package/tinymce-assets/plugins/emoticons/plugin.min.js +1 -4
  34. package/tinymce-assets/plugins/fullscreen/plugin.js +1409 -1049
  35. package/tinymce-assets/plugins/fullscreen/plugin.min.js +1 -4
  36. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +4 -1
  37. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +4 -1
  38. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +4 -1
  39. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +4 -1
  40. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +4 -1
  41. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +4 -1
  42. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +4 -1
  43. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +4 -1
  44. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +4 -1
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +4 -1
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +4 -1
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +4 -1
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +4 -1
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +4 -1
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +4 -1
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +4 -1
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +4 -1
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +4 -1
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +4 -1
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +4 -1
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +4 -1
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +4 -1
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +4 -1
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +4 -1
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +4 -1
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +4 -1
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +4 -1
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +4 -1
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +4 -1
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +4 -1
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +4 -1
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +5 -2
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +4 -1
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +4 -1
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +4 -1
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +4 -1
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +4 -1
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +8 -5
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +4 -1
  75. package/tinymce-assets/plugins/help/plugin.js +739 -809
  76. package/tinymce-assets/plugins/help/plugin.min.js +1 -4
  77. package/tinymce-assets/plugins/image/plugin.js +1475 -1291
  78. package/tinymce-assets/plugins/image/plugin.min.js +1 -4
  79. package/tinymce-assets/plugins/importcss/plugin.js +328 -269
  80. package/tinymce-assets/plugins/importcss/plugin.min.js +1 -4
  81. package/tinymce-assets/plugins/insertdatetime/plugin.js +140 -141
  82. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +1 -4
  83. package/tinymce-assets/plugins/link/plugin.js +1419 -1084
  84. package/tinymce-assets/plugins/link/plugin.min.js +1 -4
  85. package/tinymce-assets/plugins/lists/plugin.js +2177 -1805
  86. package/tinymce-assets/plugins/lists/plugin.min.js +1 -4
  87. package/tinymce-assets/plugins/media/plugin.js +1305 -1047
  88. package/tinymce-assets/plugins/media/plugin.min.js +1 -4
  89. package/tinymce-assets/plugins/nonbreaking/plugin.js +93 -88
  90. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +0 -3
  91. package/tinymce-assets/plugins/pagebreak/plugin.js +91 -85
  92. package/tinymce-assets/plugins/pagebreak/plugin.min.js +0 -3
  93. package/tinymce-assets/plugins/preview/plugin.js +742 -74
  94. package/tinymce-assets/plugins/preview/plugin.min.js +1 -4
  95. package/tinymce-assets/plugins/quickbars/plugin.js +582 -375
  96. package/tinymce-assets/plugins/quickbars/plugin.min.js +1 -4
  97. package/tinymce-assets/plugins/save/plugin.js +100 -82
  98. package/tinymce-assets/plugins/save/plugin.min.js +1 -4
  99. package/tinymce-assets/plugins/searchreplace/plugin.js +1183 -906
  100. package/tinymce-assets/plugins/searchreplace/plugin.min.js +1 -4
  101. package/tinymce-assets/plugins/table/plugin.js +3651 -3094
  102. package/tinymce-assets/plugins/table/plugin.min.js +1 -4
  103. package/tinymce-assets/plugins/visualblocks/plugin.js +71 -63
  104. package/tinymce-assets/plugins/visualblocks/plugin.min.js +1 -4
  105. package/tinymce-assets/plugins/visualchars/plugin.js +685 -436
  106. package/tinymce-assets/plugins/visualchars/plugin.min.js +1 -4
  107. package/tinymce-assets/plugins/wordcount/plugin.js +382 -307
  108. package/tinymce-assets/plugins/wordcount/plugin.min.js +1 -4
  109. package/tinymce-assets/skins/content/dark/content.css +9 -0
  110. package/tinymce-assets/skins/content/dark/content.js +10 -2
  111. package/tinymce-assets/skins/content/dark/content.min.css +9 -0
  112. package/tinymce-assets/skins/content/default/content.css +9 -0
  113. package/tinymce-assets/skins/content/default/content.js +10 -2
  114. package/tinymce-assets/skins/content/default/content.min.css +9 -0
  115. package/tinymce-assets/skins/content/document/content.css +9 -0
  116. package/tinymce-assets/skins/content/document/content.js +10 -2
  117. package/tinymce-assets/skins/content/document/content.min.css +9 -0
  118. package/tinymce-assets/skins/content/tinymce-5/content.css +9 -0
  119. package/tinymce-assets/skins/content/tinymce-5/content.js +10 -2
  120. package/tinymce-assets/skins/content/tinymce-5/content.min.css +9 -0
  121. package/tinymce-assets/skins/content/tinymce-5-dark/content.css +9 -0
  122. package/tinymce-assets/skins/content/tinymce-5-dark/content.js +10 -2
  123. package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +9 -0
  124. package/tinymce-assets/skins/content/writer/content.css +9 -0
  125. package/tinymce-assets/skins/content/writer/content.js +10 -2
  126. package/tinymce-assets/skins/content/writer/content.min.css +9 -0
  127. package/tinymce-assets/skins/ui/oxide/content.css +157 -49
  128. package/tinymce-assets/skins/ui/oxide/content.inline.css +157 -49
  129. package/tinymce-assets/skins/ui/oxide/content.inline.js +10 -2
  130. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +10 -1
  131. package/tinymce-assets/skins/ui/oxide/content.js +10 -2
  132. package/tinymce-assets/skins/ui/oxide/content.min.css +10 -1
  133. package/tinymce-assets/skins/ui/oxide/skin.css +1592 -214
  134. package/tinymce-assets/skins/ui/oxide/skin.js +1 -2
  135. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  136. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +1 -2
  137. package/tinymce-assets/skins/ui/oxide-dark/content.css +157 -42
  138. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +157 -49
  139. package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +10 -2
  140. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +10 -1
  141. package/tinymce-assets/skins/ui/oxide-dark/content.js +10 -2
  142. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +10 -1
  143. package/tinymce-assets/skins/ui/oxide-dark/skin.css +1595 -217
  144. package/tinymce-assets/skins/ui/oxide-dark/skin.js +1 -2
  145. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  146. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +1 -2
  147. package/tinymce-assets/skins/ui/tinymce-5/content.css +157 -49
  148. package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +157 -49
  149. package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +10 -2
  150. package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +10 -1
  151. package/tinymce-assets/skins/ui/tinymce-5/content.js +10 -2
  152. package/tinymce-assets/skins/ui/tinymce-5/content.min.css +10 -1
  153. package/tinymce-assets/skins/ui/tinymce-5/skin.css +1606 -203
  154. package/tinymce-assets/skins/ui/tinymce-5/skin.js +1 -2
  155. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
  156. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +1 -2
  157. package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +157 -42
  158. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +157 -49
  159. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +10 -2
  160. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +10 -1
  161. package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +10 -2
  162. package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +10 -1
  163. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +1607 -204
  164. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +1 -2
  165. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  166. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -2
  167. package/tinymce-assets/themes/silver/theme.js +32786 -28738
  168. package/tinymce-assets/themes/silver/theme.min.js +1 -4
  169. package/types/dangl-angular-material-shared-tiny-mce.d.ts +13 -13
  170. package/types/dangl-angular-material-shared.d.ts +26 -26
  171. package/tinymce-assets/plugins/template/index.js +0 -7
  172. package/tinymce-assets/plugins/template/plugin.js +0 -567
  173. package/tinymce-assets/plugins/template/plugin.min.js +0 -4
@@ -1,192 +1,223 @@
1
1
  /**
2
- * TinyMCE version 6.8.3 (2024-02-08)
2
+ * TinyMCE version 7.9.3 (2026-05-19)
3
3
  */
4
4
 
5
5
  (function () {
6
6
  'use strict';
7
7
 
8
- const Cell = initial => {
9
- let value = initial;
10
- const get = () => {
11
- return value;
12
- };
13
- const set = v => {
14
- value = v;
15
- };
16
- return {
17
- get,
18
- set
19
- };
8
+ const Cell = (initial) => {
9
+ let value = initial;
10
+ const get = () => {
11
+ return value;
12
+ };
13
+ const set = (v) => {
14
+ value = v;
15
+ };
16
+ return {
17
+ get,
18
+ set
19
+ };
20
20
  };
21
21
 
22
22
  var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
23
23
 
24
- const constant = value => {
25
- return () => {
26
- return value;
27
- };
28
- };
29
-
30
24
  var global = tinymce.util.Tools.resolve('tinymce.Env');
31
25
 
32
- const fireResizeEditor = editor => editor.dispatch('ResizeEditor');
26
+ const fireResizeEditor = (editor) => editor.dispatch('ResizeEditor');
33
27
 
34
- const option = name => editor => editor.options.get(name);
35
- const register$1 = editor => {
36
- const registerOption = editor.options.register;
37
- registerOption('autoresize_overflow_padding', {
38
- processor: 'number',
39
- default: 1
40
- });
41
- registerOption('autoresize_bottom_margin', {
42
- processor: 'number',
43
- default: 50
44
- });
28
+ const option = (name) => (editor) => editor.options.get(name);
29
+ const register$1 = (editor) => {
30
+ const registerOption = editor.options.register;
31
+ registerOption('autoresize_overflow_padding', {
32
+ processor: 'number',
33
+ default: 1
34
+ });
35
+ registerOption('autoresize_bottom_margin', {
36
+ processor: 'number',
37
+ default: 50
38
+ });
45
39
  };
46
40
  const getMinHeight = option('min_height');
47
41
  const getMaxHeight = option('max_height');
48
42
  const getAutoResizeOverflowPadding = option('autoresize_overflow_padding');
49
43
  const getAutoResizeBottomMargin = option('autoresize_bottom_margin');
50
44
 
51
- const isFullscreen = editor => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
45
+ /**
46
+ * This class contains all core logic for the autoresize plugin.
47
+ *
48
+ * @class tinymce.autoresize.Plugin
49
+ * @private
50
+ */
51
+ const isFullscreen = (editor) => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
52
52
  const toggleScrolling = (editor, state) => {
53
- const body = editor.getBody();
54
- if (body) {
55
- body.style.overflowY = state ? '' : 'hidden';
56
- if (!state) {
57
- body.scrollTop = 0;
53
+ const body = editor.getBody();
54
+ if (body) {
55
+ body.style.overflowY = state ? '' : 'hidden';
56
+ if (!state) {
57
+ body.scrollTop = 0;
58
+ }
58
59
  }
59
- }
60
60
  };
61
61
  const parseCssValueToInt = (dom, elm, name, computed) => {
62
- var _a;
63
- const value = parseInt((_a = dom.getStyle(elm, name, computed)) !== null && _a !== void 0 ? _a : '', 10);
64
- return isNaN(value) ? 0 : value;
62
+ var _a;
63
+ const value = parseInt((_a = dom.getStyle(elm, name, computed)) !== null && _a !== void 0 ? _a : '', 10);
64
+ // The value maybe be an empty string, so in that case treat it as being 0
65
+ return isNaN(value) ? 0 : value;
65
66
  };
66
- const shouldScrollIntoView = trigger => {
67
- if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') {
68
- const setContentEvent = trigger;
69
- return setContentEvent.selection === true || setContentEvent.paste === true;
70
- } else {
71
- return false;
72
- }
67
+ const shouldScrollIntoView = (trigger) => {
68
+ // Only scroll the selection into view when we're inserting content. Any other
69
+ // triggers the selection should already be in view and resizing would only
70
+ // extend the content area.
71
+ if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') {
72
+ const setContentEvent = trigger;
73
+ return setContentEvent.selection === true || setContentEvent.paste === true;
74
+ }
75
+ else {
76
+ return false;
77
+ }
73
78
  };
79
+ /**
80
+ * This method gets executed each time the editor needs to resize.
81
+ */
74
82
  const resize = (editor, oldSize, trigger, getExtraMarginBottom) => {
75
- var _a;
76
- const dom = editor.dom;
77
- const doc = editor.getDoc();
78
- if (!doc) {
79
- return;
80
- }
81
- if (isFullscreen(editor)) {
82
- toggleScrolling(editor, true);
83
- return;
84
- }
85
- const docEle = doc.documentElement;
86
- const resizeBottomMargin = getExtraMarginBottom ? getExtraMarginBottom() : getAutoResizeOverflowPadding(editor);
87
- const minHeight = (_a = getMinHeight(editor)) !== null && _a !== void 0 ? _a : editor.getElement().offsetHeight;
88
- let resizeHeight = minHeight;
89
- const marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
90
- const marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
91
- let contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
92
- if (contentHeight < 0) {
93
- contentHeight = 0;
94
- }
95
- const containerHeight = editor.getContainer().offsetHeight;
96
- const contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
97
- const chromeHeight = containerHeight - contentAreaHeight;
98
- if (contentHeight + chromeHeight > minHeight) {
99
- resizeHeight = contentHeight + chromeHeight;
100
- }
101
- const maxHeight = getMaxHeight(editor);
102
- if (maxHeight && resizeHeight > maxHeight) {
103
- resizeHeight = maxHeight;
104
- toggleScrolling(editor, true);
105
- } else {
106
- toggleScrolling(editor, false);
107
- }
108
- if (resizeHeight !== oldSize.get()) {
109
- const deltaSize = resizeHeight - oldSize.get();
110
- dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
111
- oldSize.set(resizeHeight);
112
- fireResizeEditor(editor);
113
- if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
114
- const win = editor.getWin();
115
- win.scrollTo(win.pageXOffset, win.pageYOffset);
83
+ var _a;
84
+ const dom = editor.dom;
85
+ const doc = editor.getDoc();
86
+ if (!doc) {
87
+ return;
88
+ }
89
+ if (isFullscreen(editor)) {
90
+ toggleScrolling(editor, true);
91
+ return;
92
+ }
93
+ const docEle = doc.documentElement;
94
+ const resizeBottomMargin = getExtraMarginBottom ? getExtraMarginBottom() : getAutoResizeOverflowPadding(editor);
95
+ const minHeight = (_a = getMinHeight(editor)) !== null && _a !== void 0 ? _a : editor.getElement().offsetHeight;
96
+ let resizeHeight = minHeight;
97
+ // Calculate outer height of the doc element using CSS styles
98
+ const marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
99
+ const marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
100
+ let contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
101
+ // Make sure we have a valid height
102
+ if (contentHeight < 0) {
103
+ contentHeight = 0;
104
+ }
105
+ // Determine the size of the chroming (menubar, toolbar, etc...)
106
+ const containerHeight = editor.getContainer().offsetHeight;
107
+ const contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
108
+ const chromeHeight = containerHeight - contentAreaHeight;
109
+ // Don't make it smaller than the minimum height
110
+ if (contentHeight + chromeHeight > minHeight) {
111
+ resizeHeight = contentHeight + chromeHeight;
116
112
  }
117
- if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
118
- editor.selection.scrollIntoView();
113
+ // If a maximum height has been defined don't exceed this height
114
+ const maxHeight = getMaxHeight(editor);
115
+ if (maxHeight && resizeHeight > maxHeight) {
116
+ resizeHeight = maxHeight;
117
+ toggleScrolling(editor, true);
119
118
  }
120
- if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) {
121
- resize(editor, oldSize, trigger, getExtraMarginBottom);
119
+ else {
120
+ toggleScrolling(editor, false);
121
+ }
122
+ const old = oldSize.get();
123
+ if (old.set) {
124
+ editor.dom.setStyles(editor.getDoc().documentElement, { 'min-height': 0 });
125
+ editor.dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
126
+ }
127
+ // Resize content element
128
+ if (resizeHeight !== old.totalHeight && (contentHeight - resizeBottomMargin !== old.contentHeight || !old.set)) {
129
+ const deltaSize = (resizeHeight - old.totalHeight);
130
+ dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
131
+ oldSize.set({
132
+ totalHeight: resizeHeight,
133
+ contentHeight,
134
+ set: true,
135
+ });
136
+ fireResizeEditor(editor);
137
+ // iPadOS has an issue where it won't rerender the body when the iframe is resized
138
+ // however if we reset the scroll position then it re-renders correctly
139
+ if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
140
+ const win = editor.getWin();
141
+ win.scrollTo(win.pageXOffset, win.pageYOffset);
142
+ }
143
+ // Ensure the selection is in view, as it's potentially out of view after inserting content into the editor
144
+ if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
145
+ editor.selection.scrollIntoView();
146
+ }
147
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
148
+ // So we need to continue to resize the iframe down until the size gets fixed
149
+ if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) {
150
+ resize(editor, oldSize, trigger, getExtraMarginBottom);
151
+ }
122
152
  }
123
- }
124
153
  };
125
154
  const setup = (editor, oldSize) => {
126
- let getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
127
- let resizeCounter;
128
- let sizeAfterFirstResize;
129
- editor.on('init', e => {
130
- resizeCounter = 0;
131
- const overflowPadding = getAutoResizeOverflowPadding(editor);
132
- const dom = editor.dom;
133
- dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });
134
- if (global.browser.isEdge() || global.browser.isIE()) {
135
- dom.setStyles(editor.getBody(), {
136
- 'paddingLeft': overflowPadding,
137
- 'paddingRight': overflowPadding,
138
- 'min-height': 0
139
- });
140
- } else {
141
- dom.setStyles(editor.getBody(), {
142
- paddingLeft: overflowPadding,
143
- paddingRight: overflowPadding
144
- });
145
- }
146
- resize(editor, oldSize, e, getExtraMarginBottom);
147
- resizeCounter += 1;
148
- });
149
- editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', e => {
150
- if (resizeCounter === 1) {
151
- sizeAfterFirstResize = editor.getContainer().offsetHeight;
152
- resize(editor, oldSize, e, getExtraMarginBottom);
153
- resizeCounter += 1;
154
- } else if (resizeCounter === 2) {
155
- const isLooping = sizeAfterFirstResize < editor.getContainer().offsetHeight;
156
- if (isLooping) {
155
+ const getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
156
+ editor.on('init', (e) => {
157
+ const overflowPadding = getAutoResizeOverflowPadding(editor);
157
158
  const dom = editor.dom;
158
- const doc = editor.getDoc();
159
- dom.setStyles(doc.documentElement, { 'min-height': 0 });
160
- dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
161
- }
162
- getExtraMarginBottom = isLooping ? constant(0) : getExtraMarginBottom;
163
- resizeCounter += 1;
164
- } else {
165
- resize(editor, oldSize, e, getExtraMarginBottom);
166
- }
167
- });
159
+ // Disable height 100% on the root document element otherwise we'll end up resizing indefinitely
160
+ dom.setStyles(editor.getDoc().documentElement, {
161
+ height: 'auto'
162
+ });
163
+ if (global.browser.isEdge() || global.browser.isIE()) {
164
+ dom.setStyles(editor.getBody(), {
165
+ 'paddingLeft': overflowPadding,
166
+ 'paddingRight': overflowPadding,
167
+ // IE & Edge have a min height of 150px by default on the body, so override that
168
+ 'min-height': 0
169
+ });
170
+ }
171
+ else {
172
+ dom.setStyles(editor.getBody(), {
173
+ paddingLeft: overflowPadding,
174
+ paddingRight: overflowPadding
175
+ });
176
+ }
177
+ resize(editor, oldSize, e, getExtraMarginBottom);
178
+ });
179
+ editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', (e) => {
180
+ resize(editor, oldSize, e, getExtraMarginBottom);
181
+ });
168
182
  };
169
183
 
170
184
  const register = (editor, oldSize) => {
171
- editor.addCommand('mceAutoResize', () => {
172
- resize(editor, oldSize);
173
- });
185
+ editor.addCommand('mceAutoResize', () => {
186
+ resize(editor, oldSize);
187
+ });
174
188
  };
175
189
 
190
+ /**
191
+ * This class contains all core logic for the autoresize plugin.
192
+ *
193
+ * @class tinymce.autoresize.Plugin
194
+ * @private
195
+ */
176
196
  var Plugin = () => {
177
- global$1.add('autoresize', editor => {
178
- register$1(editor);
179
- if (!editor.options.isSet('resize')) {
180
- editor.options.set('resize', false);
181
- }
182
- if (!editor.inline) {
183
- const oldSize = Cell(0);
184
- register(editor, oldSize);
185
- setup(editor, oldSize);
186
- }
187
- });
197
+ global$1.add('autoresize', (editor) => {
198
+ register$1(editor);
199
+ // If autoresize is enabled, disable resize if the user hasn't explicitly enabled it
200
+ // TINY-8288: This currently does nothing because of a bug in the theme
201
+ if (!editor.options.isSet('resize')) {
202
+ editor.options.set('resize', false);
203
+ }
204
+ if (!editor.inline) {
205
+ const oldSize = Cell({
206
+ totalHeight: 0,
207
+ contentHeight: 0,
208
+ set: false,
209
+ });
210
+ register(editor, oldSize);
211
+ setup(editor, oldSize);
212
+ }
213
+ });
188
214
  };
189
215
 
190
216
  Plugin();
217
+ /** *****
218
+ * DO NOT EXPORT ANYTHING
219
+ *
220
+ * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
221
+ *******/
191
222
 
192
223
  })();
@@ -1,4 +1 @@
1
- /**
2
- * TinyMCE version 6.8.3 (2024-02-08)
3
- */
4
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),s=o("min_height"),i=o("max_height"),n=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},g=(e,t,o,s)=>{var i;const n=parseInt(null!==(i=e.getStyle(t,o,s))&&void 0!==i?i:"",10);return isNaN(n)?0:n},a=(e,o,r,c)=>{var d;const f=e.dom,u=e.getDoc();if(!u)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const m=u.documentElement,h=c?c():n(e),p=null!==(d=s(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const S=g(f,m,"margin-top",!0),v=g(f,m,"margin-bottom",!0);let C=m.offsetHeight+S+v+h;C<0&&(C=0);const b=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+b>p&&(y=C+b);const w=i(e);if(w&&y>w?(y=w,l(e,!0)):l(e,!1),y!==o.get()){const s=y-o.get();if(f.setStyle(e.getContainer(),"height",y+"px"),o.set(y),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&s<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{let s,i,l=()=>r(e);e.on("init",(i=>{s=0;const r=n(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,i,l),s+=1})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{if(1===s)i=e.getContainer().offsetHeight,a(e,o,t,l),s+=1;else if(2===s){const t=i<e.getContainer().offsetHeight;if(t){const t=e.dom,o=e.getDoc();t.setStyles(o.documentElement,{"min-height":0}),t.setStyles(e.getBody(),{"min-height":"inherit"})}l=t?(0,()=>0):l,s+=1}else a(e,o,t,l)}))})(e,o)}}))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),s=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),g=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},l=(e,t,o,n)=>{var s;const i=parseInt(null!==(s=e.getStyle(t,o,n))&&void 0!==s?s:"",10);return isNaN(i)?0:i},a=(e,o,r,c)=>{var d;const u=e.dom,h=e.getDoc();if(!h)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void g(e,!0);const m=h.documentElement,f=c?c():i(e),p=null!==(d=n(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const S=l(u,m,"margin-top",!0),v=l(u,m,"margin-bottom",!0);let C=m.offsetHeight+S+v+f;C<0&&(C=0);const H=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+H>p&&(y=C+H);const b=s(e);b&&y>b?(y=b,g(e,!0)):g(e,!1);const w=o.get();if(w.set&&(e.dom.setStyles(e.getDoc().documentElement,{"min-height":0}),e.dom.setStyles(e.getBody(),{"min-height":"inherit"})),y!==w.totalHeight&&(C-f!==w.contentHeight||!w.set)){const n=y-w.totalHeight;if(u.setStyle(e.getContainer(),"height",y+"px"),o.set({totalHeight:y,contentHeight:C,set:!0}),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(()=>{let e={totalHeight:0,contentHeight:0,set:!1};return{get:()=>e,set:t=>{e=t}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{const n=()=>r(e);e.on("init",(s=>{const r=i(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,s,n)})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{a(e,o,t,n)}))})(e,o)}}))}();