@dangl/angular-material-shared 2.9.0-beta0047 → 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.
- package/package.json +1 -1
- package/tinymce-assets/icons/default/icons.js +9 -46
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/models/dom/model.js +7239 -8193
- package/tinymce-assets/models/dom/model.min.js +1 -1
- package/tinymce-assets/plugins/accordion/plugin.js +879 -1174
- package/tinymce-assets/plugins/accordion/plugin.min.js +5 -1
- package/tinymce-assets/plugins/advlist/plugin.js +200 -412
- package/tinymce-assets/plugins/advlist/plugin.min.js +5 -1
- package/tinymce-assets/plugins/anchor/plugin.js +166 -189
- package/tinymce-assets/plugins/anchor/plugin.min.js +5 -1
- package/tinymce-assets/plugins/autolink/plugin.js +220 -310
- package/tinymce-assets/plugins/autolink/plugin.min.js +5 -1
- package/tinymce-assets/plugins/autoresize/plugin.js +149 -180
- package/tinymce-assets/plugins/autoresize/plugin.min.js +5 -1
- package/tinymce-assets/plugins/autosave/plugin.js +189 -208
- package/tinymce-assets/plugins/autosave/plugin.min.js +5 -1
- package/tinymce-assets/plugins/charmap/plugin.js +1566 -905
- package/tinymce-assets/plugins/charmap/plugin.min.js +5 -1
- package/tinymce-assets/plugins/code/plugin.js +61 -73
- package/tinymce-assets/plugins/code/plugin.min.js +4 -0
- package/tinymce-assets/plugins/codesample/plugin.js +2409 -3592
- package/tinymce-assets/plugins/codesample/plugin.min.js +12 -8
- package/tinymce-assets/plugins/directionality/plugin.js +304 -545
- package/tinymce-assets/plugins/directionality/plugin.min.js +5 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +488 -702
- package/tinymce-assets/plugins/emoticons/plugin.min.js +5 -1
- package/tinymce-assets/plugins/fullscreen/plugin.js +1049 -1409
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +5 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +2 -5
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +1 -4
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +5 -8
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +1 -4
- package/tinymce-assets/plugins/help/plugin.js +809 -739
- package/tinymce-assets/plugins/help/plugin.min.js +5 -1
- package/tinymce-assets/plugins/image/plugin.js +1291 -1475
- package/tinymce-assets/plugins/image/plugin.min.js +5 -1
- package/tinymce-assets/plugins/importcss/plugin.js +269 -328
- package/tinymce-assets/plugins/importcss/plugin.min.js +5 -1
- package/tinymce-assets/plugins/insertdatetime/plugin.js +141 -140
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +5 -1
- package/tinymce-assets/plugins/link/plugin.js +1084 -1419
- package/tinymce-assets/plugins/link/plugin.min.js +5 -1
- package/tinymce-assets/plugins/lists/plugin.js +1805 -2177
- package/tinymce-assets/plugins/lists/plugin.min.js +5 -1
- package/tinymce-assets/plugins/media/plugin.js +1047 -1305
- package/tinymce-assets/plugins/media/plugin.min.js +5 -1
- package/tinymce-assets/plugins/nonbreaking/plugin.js +88 -93
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +4 -0
- package/tinymce-assets/plugins/pagebreak/plugin.js +85 -91
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +4 -0
- package/tinymce-assets/plugins/preview/plugin.js +74 -742
- package/tinymce-assets/plugins/preview/plugin.min.js +5 -1
- package/tinymce-assets/plugins/quickbars/plugin.js +375 -582
- package/tinymce-assets/plugins/quickbars/plugin.min.js +5 -1
- package/tinymce-assets/plugins/save/plugin.js +82 -100
- package/tinymce-assets/plugins/save/plugin.min.js +5 -1
- package/tinymce-assets/plugins/searchreplace/plugin.js +906 -1183
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +5 -1
- package/tinymce-assets/plugins/table/plugin.js +3094 -3651
- package/tinymce-assets/plugins/table/plugin.min.js +5 -1
- package/tinymce-assets/plugins/template/index.js +7 -0
- package/tinymce-assets/plugins/template/plugin.js +567 -0
- package/tinymce-assets/plugins/template/plugin.min.js +5 -0
- package/tinymce-assets/plugins/visualblocks/plugin.js +63 -71
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +5 -1
- package/tinymce-assets/plugins/visualchars/plugin.js +436 -685
- package/tinymce-assets/plugins/visualchars/plugin.min.js +5 -1
- package/tinymce-assets/plugins/wordcount/plugin.js +307 -382
- package/tinymce-assets/plugins/wordcount/plugin.min.js +5 -1
- package/tinymce-assets/skins/content/dark/content.css +4 -0
- package/tinymce-assets/skins/content/dark/content.js +6 -1
- package/tinymce-assets/skins/content/dark/content.min.css +4 -0
- package/tinymce-assets/skins/content/default/content.css +4 -0
- package/tinymce-assets/skins/content/default/content.js +6 -1
- package/tinymce-assets/skins/content/default/content.min.css +4 -0
- package/tinymce-assets/skins/content/document/content.css +4 -0
- package/tinymce-assets/skins/content/document/content.js +6 -1
- package/tinymce-assets/skins/content/document/content.min.css +4 -0
- package/tinymce-assets/skins/content/tinymce-5/content.css +4 -0
- package/tinymce-assets/skins/content/tinymce-5/content.js +6 -1
- package/tinymce-assets/skins/content/tinymce-5/content.min.css +4 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.css +4 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.js +6 -1
- package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +4 -0
- package/tinymce-assets/skins/content/writer/content.css +4 -0
- package/tinymce-assets/skins/content/writer/content.js +6 -1
- package/tinymce-assets/skins/content/writer/content.min.css +4 -0
- package/tinymce-assets/skins/ui/oxide/content.css +53 -148
- package/tinymce-assets/skins/ui/oxide/content.inline.css +53 -148
- package/tinymce-assets/skins/ui/oxide/content.inline.js +6 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +5 -1
- package/tinymce-assets/skins/ui/oxide/content.js +6 -1
- package/tinymce-assets/skins/ui/oxide/content.min.css +5 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +207 -1585
- package/tinymce-assets/skins/ui/oxide/skin.js +2 -1
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.css +46 -148
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +53 -148
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +6 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +5 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.js +6 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +5 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +219 -1597
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -1
- package/tinymce-assets/skins/ui/tinymce-5/content.css +53 -148
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +53 -148
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +6 -1
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +5 -1
- package/tinymce-assets/skins/ui/tinymce-5/content.js +6 -1
- package/tinymce-assets/skins/ui/tinymce-5/content.min.css +5 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +194 -1597
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +46 -148
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +53 -148
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +6 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +5 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +6 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +5 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +202 -1605
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -1
- package/tinymce-assets/themes/silver/theme.js +28439 -32466
- package/tinymce-assets/themes/silver/theme.min.js +1 -1
|
@@ -1,223 +1,192 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.6 (TBD)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const Cell =
|
|
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
|
+
|
|
24
30
|
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
25
31
|
|
|
26
|
-
const fireResizeEditor =
|
|
32
|
+
const fireResizeEditor = editor => editor.dispatch('ResizeEditor');
|
|
27
33
|
|
|
28
|
-
const option =
|
|
29
|
-
const register$1 =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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 =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
-
|
|
120
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
160
|
-
dom.setStyles(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
186
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
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)}}))}();
|