@dangl/angular-material-shared 2.9.0-beta0040 → 2.9.0-beta0048

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 (165) hide show
  1. package/package.json +1 -1
  2. package/tinymce-assets/icons/default/icons.js +9 -46
  3. package/tinymce-assets/icons/default/icons.min.js +1 -1
  4. package/tinymce-assets/models/dom/model.js +7239 -8193
  5. package/tinymce-assets/models/dom/model.min.js +1 -1
  6. package/tinymce-assets/plugins/accordion/plugin.js +879 -1174
  7. package/tinymce-assets/plugins/accordion/plugin.min.js +5 -1
  8. package/tinymce-assets/plugins/advlist/plugin.js +200 -412
  9. package/tinymce-assets/plugins/advlist/plugin.min.js +5 -1
  10. package/tinymce-assets/plugins/anchor/plugin.js +166 -189
  11. package/tinymce-assets/plugins/anchor/plugin.min.js +5 -1
  12. package/tinymce-assets/plugins/autolink/plugin.js +220 -310
  13. package/tinymce-assets/plugins/autolink/plugin.min.js +5 -1
  14. package/tinymce-assets/plugins/autoresize/plugin.js +149 -180
  15. package/tinymce-assets/plugins/autoresize/plugin.min.js +5 -1
  16. package/tinymce-assets/plugins/autosave/plugin.js +189 -208
  17. package/tinymce-assets/plugins/autosave/plugin.min.js +5 -1
  18. package/tinymce-assets/plugins/charmap/plugin.js +1566 -905
  19. package/tinymce-assets/plugins/charmap/plugin.min.js +5 -1
  20. package/tinymce-assets/plugins/code/plugin.js +61 -73
  21. package/tinymce-assets/plugins/code/plugin.min.js +4 -0
  22. package/tinymce-assets/plugins/codesample/plugin.js +2409 -3592
  23. package/tinymce-assets/plugins/codesample/plugin.min.js +12 -8
  24. package/tinymce-assets/plugins/directionality/plugin.js +304 -545
  25. package/tinymce-assets/plugins/directionality/plugin.min.js +5 -1
  26. package/tinymce-assets/plugins/emoticons/plugin.js +488 -702
  27. package/tinymce-assets/plugins/emoticons/plugin.min.js +5 -1
  28. package/tinymce-assets/plugins/fullscreen/plugin.js +1049 -1409
  29. package/tinymce-assets/plugins/fullscreen/plugin.min.js +5 -1
  30. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +1 -4
  31. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +1 -4
  32. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +1 -4
  33. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +1 -4
  34. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +1 -4
  35. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +1 -4
  36. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +1 -4
  37. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +1 -4
  38. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +1 -4
  39. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +1 -4
  40. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +1 -4
  41. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +1 -4
  42. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +1 -4
  43. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +1 -4
  44. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +1 -4
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +1 -4
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +1 -4
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +1 -4
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +1 -4
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +1 -4
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +1 -4
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +1 -4
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +1 -4
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +1 -4
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +1 -4
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +1 -4
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +1 -4
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +1 -4
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +1 -4
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +1 -4
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +1 -4
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +2 -5
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +1 -4
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +1 -4
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +1 -4
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +1 -4
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +1 -4
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +5 -8
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +1 -4
  69. package/tinymce-assets/plugins/help/plugin.js +809 -739
  70. package/tinymce-assets/plugins/help/plugin.min.js +5 -1
  71. package/tinymce-assets/plugins/image/plugin.js +1291 -1475
  72. package/tinymce-assets/plugins/image/plugin.min.js +5 -1
  73. package/tinymce-assets/plugins/importcss/plugin.js +269 -328
  74. package/tinymce-assets/plugins/importcss/plugin.min.js +5 -1
  75. package/tinymce-assets/plugins/insertdatetime/plugin.js +141 -140
  76. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +5 -1
  77. package/tinymce-assets/plugins/link/plugin.js +1084 -1419
  78. package/tinymce-assets/plugins/link/plugin.min.js +5 -1
  79. package/tinymce-assets/plugins/lists/plugin.js +1805 -2177
  80. package/tinymce-assets/plugins/lists/plugin.min.js +5 -1
  81. package/tinymce-assets/plugins/media/plugin.js +1047 -1305
  82. package/tinymce-assets/plugins/media/plugin.min.js +5 -1
  83. package/tinymce-assets/plugins/nonbreaking/plugin.js +88 -93
  84. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +4 -0
  85. package/tinymce-assets/plugins/pagebreak/plugin.js +85 -91
  86. package/tinymce-assets/plugins/pagebreak/plugin.min.js +4 -0
  87. package/tinymce-assets/plugins/preview/plugin.js +74 -742
  88. package/tinymce-assets/plugins/preview/plugin.min.js +5 -1
  89. package/tinymce-assets/plugins/quickbars/plugin.js +375 -582
  90. package/tinymce-assets/plugins/quickbars/plugin.min.js +5 -1
  91. package/tinymce-assets/plugins/save/plugin.js +82 -100
  92. package/tinymce-assets/plugins/save/plugin.min.js +5 -1
  93. package/tinymce-assets/plugins/searchreplace/plugin.js +906 -1183
  94. package/tinymce-assets/plugins/searchreplace/plugin.min.js +5 -1
  95. package/tinymce-assets/plugins/table/plugin.js +3094 -3651
  96. package/tinymce-assets/plugins/table/plugin.min.js +5 -1
  97. package/tinymce-assets/plugins/template/index.js +7 -0
  98. package/tinymce-assets/plugins/template/plugin.js +567 -0
  99. package/tinymce-assets/plugins/template/plugin.min.js +5 -0
  100. package/tinymce-assets/plugins/visualblocks/plugin.js +63 -71
  101. package/tinymce-assets/plugins/visualblocks/plugin.min.js +5 -1
  102. package/tinymce-assets/plugins/visualchars/plugin.js +436 -685
  103. package/tinymce-assets/plugins/visualchars/plugin.min.js +5 -1
  104. package/tinymce-assets/plugins/wordcount/plugin.js +307 -382
  105. package/tinymce-assets/plugins/wordcount/plugin.min.js +5 -1
  106. package/tinymce-assets/skins/content/dark/content.css +4 -0
  107. package/tinymce-assets/skins/content/dark/content.js +6 -1
  108. package/tinymce-assets/skins/content/dark/content.min.css +4 -0
  109. package/tinymce-assets/skins/content/default/content.css +4 -0
  110. package/tinymce-assets/skins/content/default/content.js +6 -1
  111. package/tinymce-assets/skins/content/default/content.min.css +4 -0
  112. package/tinymce-assets/skins/content/document/content.css +4 -0
  113. package/tinymce-assets/skins/content/document/content.js +6 -1
  114. package/tinymce-assets/skins/content/document/content.min.css +4 -0
  115. package/tinymce-assets/skins/content/tinymce-5/content.css +4 -0
  116. package/tinymce-assets/skins/content/tinymce-5/content.js +6 -1
  117. package/tinymce-assets/skins/content/tinymce-5/content.min.css +4 -0
  118. package/tinymce-assets/skins/content/tinymce-5-dark/content.css +4 -0
  119. package/tinymce-assets/skins/content/tinymce-5-dark/content.js +6 -1
  120. package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +4 -0
  121. package/tinymce-assets/skins/content/writer/content.css +4 -0
  122. package/tinymce-assets/skins/content/writer/content.js +6 -1
  123. package/tinymce-assets/skins/content/writer/content.min.css +4 -0
  124. package/tinymce-assets/skins/ui/oxide/content.css +53 -148
  125. package/tinymce-assets/skins/ui/oxide/content.inline.css +53 -148
  126. package/tinymce-assets/skins/ui/oxide/content.inline.js +6 -1
  127. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +5 -1
  128. package/tinymce-assets/skins/ui/oxide/content.js +6 -1
  129. package/tinymce-assets/skins/ui/oxide/content.min.css +5 -1
  130. package/tinymce-assets/skins/ui/oxide/skin.css +207 -1585
  131. package/tinymce-assets/skins/ui/oxide/skin.js +2 -1
  132. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  133. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -1
  134. package/tinymce-assets/skins/ui/oxide-dark/content.css +46 -148
  135. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +53 -148
  136. package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +6 -1
  137. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +5 -1
  138. package/tinymce-assets/skins/ui/oxide-dark/content.js +6 -1
  139. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +5 -1
  140. package/tinymce-assets/skins/ui/oxide-dark/skin.css +219 -1597
  141. package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -1
  142. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  143. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -1
  144. package/tinymce-assets/skins/ui/tinymce-5/content.css +53 -148
  145. package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +53 -148
  146. package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +6 -1
  147. package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +5 -1
  148. package/tinymce-assets/skins/ui/tinymce-5/content.js +6 -1
  149. package/tinymce-assets/skins/ui/tinymce-5/content.min.css +5 -1
  150. package/tinymce-assets/skins/ui/tinymce-5/skin.css +194 -1597
  151. package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -1
  152. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
  153. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -1
  154. package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +46 -148
  155. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +53 -148
  156. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +6 -1
  157. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +5 -1
  158. package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +6 -1
  159. package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +5 -1
  160. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +202 -1605
  161. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -1
  162. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  163. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -1
  164. package/tinymce-assets/themes/silver/theme.js +28439 -32466
  165. package/tinymce-assets/themes/silver/theme.min.js +1 -1
@@ -1,223 +1,192 @@
1
1
  /**
2
- * TinyMCE version 7.9.3 (2026-05-19)
2
+ * TinyMCE version 6.8.6 (TBD)
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
+
24
30
  var global = tinymce.util.Tools.resolve('tinymce.Env');
25
31
 
26
- const fireResizeEditor = (editor) => editor.dispatch('ResizeEditor');
32
+ const fireResizeEditor = editor => editor.dispatch('ResizeEditor');
27
33
 
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
- });
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
+ });
39
45
  };
40
46
  const getMinHeight = option('min_height');
41
47
  const getMaxHeight = option('max_height');
42
48
  const getAutoResizeOverflowPadding = option('autoresize_overflow_padding');
43
49
  const getAutoResizeBottomMargin = option('autoresize_bottom_margin');
44
50
 
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();
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;
58
- }
53
+ const body = editor.getBody();
54
+ if (body) {
55
+ body.style.overflowY = state ? '' : 'hidden';
56
+ if (!state) {
57
+ body.scrollTop = 0;
59
58
  }
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
- // The value maybe be an empty string, so in that case treat it as being 0
65
- 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
+ return isNaN(value) ? 0 : value;
66
65
  };
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
- }
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
+ }
78
73
  };
79
- /**
80
- * This method gets executed each time the editor needs to resize.
81
- */
82
74
  const resize = (editor, oldSize, trigger, getExtraMarginBottom) => {
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;
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);
112
116
  }
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);
117
+ if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
118
+ editor.selection.scrollIntoView();
118
119
  }
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
- }
120
+ if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) {
121
+ resize(editor, oldSize, trigger, getExtraMarginBottom);
152
122
  }
123
+ }
153
124
  };
154
125
  const setup = (editor, oldSize) => {
155
- const getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
156
- editor.on('init', (e) => {
157
- const overflowPadding = getAutoResizeOverflowPadding(editor);
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) {
158
157
  const dom = editor.dom;
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
- });
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
+ });
182
168
  };
183
169
 
184
170
  const register = (editor, oldSize) => {
185
- editor.addCommand('mceAutoResize', () => {
186
- resize(editor, oldSize);
187
- });
171
+ editor.addCommand('mceAutoResize', () => {
172
+ resize(editor, oldSize);
173
+ });
188
174
  };
189
175
 
190
- /**
191
- * This class contains all core logic for the autoresize plugin.
192
- *
193
- * @class tinymce.autoresize.Plugin
194
- * @private
195
- */
196
176
  var Plugin = () => {
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
- });
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
+ });
214
188
  };
215
189
 
216
190
  Plugin();
217
- /** *****
218
- * DO NOT EXPORT ANYTHING
219
- *
220
- * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
221
- *******/
222
191
 
223
192
  })();
@@ -1 +1,5 @@
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)}}))}();
1
+ /**
2
+ * TinyMCE version 6.8.6 (TBD)
3
+ */
4
+
5
+ !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)}}))}();