@dangl/angular-material-shared 2.9.0-beta0037 → 2.9.0-beta0040
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.
- package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs +29 -35
- package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs.map +1 -1
- package/fesm2022/dangl-angular-material-shared.mjs +36 -51
- package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
- package/package.json +11 -10
- package/styles/material-theme.scss +1 -1
- package/styles/material-variables.scss +5 -5
- package/tinymce-assets/icons/default/icons.js +46 -9
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/models/dom/model.js +8198 -7244
- package/tinymce-assets/models/dom/model.min.js +1 -4
- package/tinymce-assets/plugins/accordion/plugin.js +1174 -879
- package/tinymce-assets/plugins/accordion/plugin.min.js +1 -4
- package/tinymce-assets/plugins/advlist/plugin.js +412 -200
- package/tinymce-assets/plugins/advlist/plugin.min.js +1 -4
- package/tinymce-assets/plugins/anchor/plugin.js +189 -166
- package/tinymce-assets/plugins/anchor/plugin.min.js +1 -4
- package/tinymce-assets/plugins/autolink/plugin.js +310 -220
- package/tinymce-assets/plugins/autolink/plugin.min.js +1 -4
- package/tinymce-assets/plugins/autoresize/plugin.js +180 -149
- package/tinymce-assets/plugins/autoresize/plugin.min.js +1 -4
- package/tinymce-assets/plugins/autosave/plugin.js +208 -189
- package/tinymce-assets/plugins/autosave/plugin.min.js +1 -4
- package/tinymce-assets/plugins/charmap/plugin.js +905 -1566
- package/tinymce-assets/plugins/charmap/plugin.min.js +1 -4
- package/tinymce-assets/plugins/code/plugin.js +73 -61
- package/tinymce-assets/plugins/code/plugin.min.js +0 -3
- package/tinymce-assets/plugins/codesample/plugin.js +3593 -2402
- package/tinymce-assets/plugins/codesample/plugin.min.js +8 -3
- package/tinymce-assets/plugins/directionality/plugin.js +545 -304
- package/tinymce-assets/plugins/directionality/plugin.min.js +1 -4
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +0 -2
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +0 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +702 -488
- package/tinymce-assets/plugins/emoticons/plugin.min.js +1 -4
- package/tinymce-assets/plugins/fullscreen/plugin.js +1409 -1049
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +5 -2
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +4 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +8 -5
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +4 -1
- package/tinymce-assets/plugins/help/plugin.js +739 -809
- package/tinymce-assets/plugins/help/plugin.min.js +1 -4
- package/tinymce-assets/plugins/image/plugin.js +1475 -1291
- package/tinymce-assets/plugins/image/plugin.min.js +1 -4
- package/tinymce-assets/plugins/importcss/plugin.js +328 -269
- package/tinymce-assets/plugins/importcss/plugin.min.js +1 -4
- package/tinymce-assets/plugins/insertdatetime/plugin.js +140 -141
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +1 -4
- package/tinymce-assets/plugins/link/plugin.js +1419 -1084
- package/tinymce-assets/plugins/link/plugin.min.js +1 -4
- package/tinymce-assets/plugins/lists/plugin.js +2177 -1805
- package/tinymce-assets/plugins/lists/plugin.min.js +1 -4
- package/tinymce-assets/plugins/media/plugin.js +1305 -1047
- package/tinymce-assets/plugins/media/plugin.min.js +1 -4
- package/tinymce-assets/plugins/nonbreaking/plugin.js +93 -88
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +0 -3
- package/tinymce-assets/plugins/pagebreak/plugin.js +91 -85
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +0 -3
- package/tinymce-assets/plugins/preview/plugin.js +742 -74
- package/tinymce-assets/plugins/preview/plugin.min.js +1 -4
- package/tinymce-assets/plugins/quickbars/plugin.js +582 -375
- package/tinymce-assets/plugins/quickbars/plugin.min.js +1 -4
- package/tinymce-assets/plugins/save/plugin.js +100 -82
- package/tinymce-assets/plugins/save/plugin.min.js +1 -4
- package/tinymce-assets/plugins/searchreplace/plugin.js +1183 -906
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +1 -4
- package/tinymce-assets/plugins/table/plugin.js +3651 -3094
- package/tinymce-assets/plugins/table/plugin.min.js +1 -4
- package/tinymce-assets/plugins/visualblocks/plugin.js +71 -63
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +1 -4
- package/tinymce-assets/plugins/visualchars/plugin.js +685 -436
- package/tinymce-assets/plugins/visualchars/plugin.min.js +1 -4
- package/tinymce-assets/plugins/wordcount/plugin.js +382 -307
- package/tinymce-assets/plugins/wordcount/plugin.min.js +1 -4
- package/tinymce-assets/skins/content/dark/content.css +9 -0
- package/tinymce-assets/skins/content/dark/content.js +10 -2
- package/tinymce-assets/skins/content/dark/content.min.css +9 -0
- package/tinymce-assets/skins/content/default/content.css +9 -0
- package/tinymce-assets/skins/content/default/content.js +10 -2
- package/tinymce-assets/skins/content/default/content.min.css +9 -0
- package/tinymce-assets/skins/content/document/content.css +9 -0
- package/tinymce-assets/skins/content/document/content.js +10 -2
- package/tinymce-assets/skins/content/document/content.min.css +9 -0
- package/tinymce-assets/skins/content/tinymce-5/content.css +9 -0
- package/tinymce-assets/skins/content/tinymce-5/content.js +10 -2
- package/tinymce-assets/skins/content/tinymce-5/content.min.css +9 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.css +9 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.js +10 -2
- package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +9 -0
- package/tinymce-assets/skins/content/writer/content.css +9 -0
- package/tinymce-assets/skins/content/writer/content.js +10 -2
- package/tinymce-assets/skins/content/writer/content.min.css +9 -0
- package/tinymce-assets/skins/ui/oxide/content.css +157 -49
- package/tinymce-assets/skins/ui/oxide/content.inline.css +157 -49
- package/tinymce-assets/skins/ui/oxide/content.inline.js +10 -2
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +10 -1
- package/tinymce-assets/skins/ui/oxide/content.js +10 -2
- package/tinymce-assets/skins/ui/oxide/content.min.css +10 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +1592 -214
- package/tinymce-assets/skins/ui/oxide/skin.js +1 -2
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +1 -2
- package/tinymce-assets/skins/ui/oxide-dark/content.css +157 -42
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +157 -49
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +10 -2
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +10 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.js +10 -2
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +10 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +1595 -217
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +1 -2
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +1 -2
- package/tinymce-assets/skins/ui/tinymce-5/content.css +157 -49
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +157 -49
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +10 -2
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +10 -1
- package/tinymce-assets/skins/ui/tinymce-5/content.js +10 -2
- package/tinymce-assets/skins/ui/tinymce-5/content.min.css +10 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +1606 -203
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +1 -2
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +1 -2
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +157 -42
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +157 -49
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +10 -2
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +10 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +10 -2
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +10 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +1607 -204
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +1 -2
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -2
- package/tinymce-assets/themes/silver/theme.js +32786 -28738
- package/tinymce-assets/themes/silver/theme.min.js +1 -4
- package/types/dangl-angular-material-shared-tiny-mce.d.ts +12 -13
- package/types/dangl-angular-material-shared.d.ts +26 -26
- package/tinymce-assets/plugins/template/index.js +0 -7
- package/tinymce-assets/plugins/template/plugin.js +0 -567
- package/tinymce-assets/plugins/template/plugin.min.js +0 -4
|
@@ -1,192 +1,223 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
118
|
-
|
|
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
|
-
|
|
121
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
159
|
-
dom.setStyles(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
172
|
-
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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)}}))}();
|