@dangl/angular-material-shared 2.2.0 → 2.3.0-beta0037
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/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
- package/esm2020/lib/angular-material-shared.module.mjs +38 -0
- package/esm2020/lib/components/footer/footer.component.mjs +33 -0
- package/esm2020/lib/components/header/header.component.mjs +80 -0
- package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
- package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
- package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/fesm2015/dangl-angular-material-shared.mjs +292 -0
- package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
- package/fesm2020/dangl-angular-material-shared.mjs +290 -0
- package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
- package/{dangl-angular-material-shared.d.ts → index.d.ts} +1 -0
- package/lib/angular-material-shared.module.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +3 -0
- package/lib/components/header/header.component.d.ts +3 -0
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
- package/package.json +28 -16
- package/styles/material-style.scss +1 -1
- package/styles/material-theme.scss +4 -3
- package/styles/material-variables.scss +9 -8
- package/tinymce-assets/icons/default/icons.js +11 -1
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/cs.js +118 -75
- package/tinymce-assets/langs/cy.js +61 -18
- package/tinymce-assets/langs/da.js +60 -17
- package/tinymce-assets/langs/de.js +60 -17
- package/tinymce-assets/langs/eo.js +334 -138
- package/tinymce-assets/langs/es_ES.js +32 -2
- package/tinymce-assets/langs/fa.js +60 -17
- package/tinymce-assets/langs/fa_IR.js +31 -1
- package/tinymce-assets/langs/fr_FR.js +60 -17
- package/tinymce-assets/langs/hu_HU.js +60 -17
- package/tinymce-assets/langs/ja.js +60 -17
- package/tinymce-assets/langs/ko_KR.js +3 -3
- package/tinymce-assets/langs/nb_NO.js +61 -18
- package/tinymce-assets/langs/nl.js +60 -17
- package/tinymce-assets/langs/pl.js +60 -17
- package/tinymce-assets/langs/pt_BR.js +60 -17
- package/tinymce-assets/langs/pt_PT.js +60 -17
- package/tinymce-assets/langs/ro.js +60 -17
- package/tinymce-assets/langs/ro_RO.js +32 -2
- package/tinymce-assets/langs/ru.js +60 -17
- package/tinymce-assets/langs/ru_RU.js +445 -0
- package/tinymce-assets/langs/sl.js +59 -14
- package/tinymce-assets/langs/ta.js +60 -17
- package/tinymce-assets/langs/ta_IN.js +60 -17
- package/tinymce-assets/langs/th_TH.js +60 -17
- package/tinymce-assets/langs/tr_TR.js +81 -8
- package/tinymce-assets/langs/vi.js +179 -21
- package/tinymce-assets/langs/zh_CN.js +60 -17
- package/tinymce-assets/plugins/advlist/plugin.js +29 -48
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
- package/tinymce-assets/plugins/anchor/plugin.js +8 -8
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autolink/plugin.js +58 -30
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autosave/plugin.js +9 -9
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
- package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
- package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
- package/tinymce-assets/plugins/charmap/plugin.js +39 -49
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
- package/tinymce-assets/plugins/code/plugin.js +9 -10
- package/tinymce-assets/plugins/code/plugin.min.js +2 -2
- package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
- package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
- package/tinymce-assets/plugins/directionality/plugin.js +186 -53
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
- package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullscreen/plugin.js +496 -129
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
- package/tinymce-assets/plugins/help/plugin.js +101 -122
- package/tinymce-assets/plugins/help/plugin.min.js +2 -2
- package/tinymce-assets/plugins/hr/plugin.js +9 -10
- package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
- package/tinymce-assets/plugins/image/plugin.js +78 -73
- package/tinymce-assets/plugins/image/plugin.min.js +2 -2
- package/tinymce-assets/plugins/imagetools/plugin.js +484 -307
- package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
- package/tinymce-assets/plugins/importcss/plugin.js +50 -51
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
- package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
- package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
- package/tinymce-assets/plugins/link/plugin.js +131 -125
- package/tinymce-assets/plugins/link/plugin.min.js +2 -2
- package/tinymce-assets/plugins/lists/plugin.js +256 -229
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
- package/tinymce-assets/plugins/media/plugin.js +124 -147
- package/tinymce-assets/plugins/media/plugin.min.js +2 -2
- package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
- package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
- package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
- package/tinymce-assets/plugins/pagebreak/plugin.js +16 -17
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
- package/tinymce-assets/plugins/paste/plugin.js +196 -157
- package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
- package/tinymce-assets/plugins/preview/plugin.js +13 -14
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
- package/tinymce-assets/plugins/print/plugin.js +13 -14
- package/tinymce-assets/plugins/print/plugin.min.js +2 -2
- package/tinymce-assets/plugins/quickbars/plugin.js +33 -48
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/save/plugin.js +9 -8
- package/tinymce-assets/plugins/save/plugin.min.js +2 -2
- package/tinymce-assets/plugins/searchreplace/plugin.js +73 -70
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
- package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
- package/tinymce-assets/plugins/table/plugin.js +2831 -2264
- package/tinymce-assets/plugins/table/plugin.min.js +2 -2
- package/tinymce-assets/plugins/template/plugin.js +84 -70
- package/tinymce-assets/plugins/template/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
- package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textpattern/plugin.js +76 -96
- package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
- package/tinymce-assets/plugins/toc/plugin.js +31 -29
- package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualchars/plugin.js +52 -67
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
- package/tinymce-assets/skins/ui/oxide/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/themes/mobile/theme.js +2798 -3255
- package/tinymce-assets/themes/mobile/theme.min.js +2 -2
- package/tinymce-assets/themes/silver/theme.js +25400 -25371
- package/tinymce-assets/themes/silver/theme.min.js +2 -2
- package/bundles/dangl-angular-material-shared.umd.js +0 -285
- package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
- package/dangl-angular-material-shared.metadata.json +0 -1
- package/esm2015/lib/angular-material-shared.module.js +0 -25
- package/esm2015/lib/components/footer/footer.component.js +0 -27
- package/esm2015/lib/components/header/header.component.js +0 -67
- package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
- package/fesm2015/dangl-angular-material-shared.js +0 -259
- package/fesm2015/dangl-angular-material-shared.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
26
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
27
|
|
|
28
28
|
var __assign = function () {
|
|
29
29
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
return __assign.apply(this, arguments);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
var global$
|
|
41
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
42
42
|
|
|
43
43
|
var global$2 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
|
|
44
44
|
|
|
45
|
-
var global$
|
|
45
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
|
46
46
|
|
|
47
|
-
var global
|
|
47
|
+
var global = tinymce.util.Tools.resolve('tinymce.html.Serializer');
|
|
48
48
|
|
|
49
49
|
var shouldHideInSourceView = function (editor) {
|
|
50
50
|
return editor.getParam('fullpage_hide_in_source_view');
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
return editor.getParam('protect');
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
var parseHeader = function (head) {
|
|
77
|
+
var parseHeader = function (editor, head) {
|
|
78
78
|
return global$2({
|
|
79
79
|
validate: false,
|
|
80
80
|
root_name: '#document'
|
|
81
|
-
}).parse(head, { format: 'xhtml' });
|
|
81
|
+
}, editor.schema).parse(head, { format: 'xhtml' });
|
|
82
82
|
};
|
|
83
83
|
var htmlToData = function (editor, head) {
|
|
84
|
-
var headerFragment = parseHeader(head);
|
|
84
|
+
var headerFragment = parseHeader(editor, head);
|
|
85
85
|
var data = {};
|
|
86
86
|
var elm, matches;
|
|
87
87
|
var getAttr = function (elm, name) {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
if (elm && elm.firstChild) {
|
|
107
107
|
data.title = elm.firstChild.value;
|
|
108
108
|
}
|
|
109
|
-
global$
|
|
109
|
+
global$3.each(headerFragment.getAll('meta'), function (meta) {
|
|
110
110
|
var name = meta.attr('name');
|
|
111
111
|
var httpEquiv = meta.attr('http-equiv');
|
|
112
112
|
var matches;
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
|
|
125
125
|
}
|
|
126
126
|
data.stylesheets = [];
|
|
127
|
-
global$
|
|
127
|
+
global$3.each(headerFragment.getAll('link'), function (link) {
|
|
128
128
|
if (link.attr('rel') === 'stylesheet') {
|
|
129
129
|
data.stylesheets.push(link.attr('href'));
|
|
130
130
|
}
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
return data;
|
|
141
141
|
};
|
|
142
142
|
var dataToHtml = function (editor, data, head) {
|
|
143
|
-
var headElement, elm
|
|
143
|
+
var headElement, elm;
|
|
144
144
|
var dom = editor.dom;
|
|
145
145
|
var setAttr = function (elm, name, value) {
|
|
146
146
|
elm.attr(name, value ? value : undefined);
|
|
@@ -152,11 +152,11 @@
|
|
|
152
152
|
headElement.append(node);
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
var headerFragment = parseHeader(head);
|
|
155
|
+
var headerFragment = parseHeader(editor, head);
|
|
156
156
|
headElement = headerFragment.getAll('head')[0];
|
|
157
157
|
if (!headElement) {
|
|
158
158
|
elm = headerFragment.getAll('html')[0];
|
|
159
|
-
headElement = new global$
|
|
159
|
+
headElement = new global$1('head', 1);
|
|
160
160
|
if (elm.firstChild) {
|
|
161
161
|
elm.insert(headElement, elm.firstChild, true);
|
|
162
162
|
} else {
|
|
@@ -165,12 +165,12 @@
|
|
|
165
165
|
}
|
|
166
166
|
elm = headerFragment.firstChild;
|
|
167
167
|
if (data.xml_pi) {
|
|
168
|
-
value = 'version="1.0"';
|
|
168
|
+
var value = 'version="1.0"';
|
|
169
169
|
if (data.docencoding) {
|
|
170
170
|
value += ' encoding="' + data.docencoding + '"';
|
|
171
171
|
}
|
|
172
172
|
if (elm.type !== 7) {
|
|
173
|
-
elm = new global$
|
|
173
|
+
elm = new global$1('xml', 7);
|
|
174
174
|
headerFragment.insert(elm, headerFragment.firstChild, true);
|
|
175
175
|
}
|
|
176
176
|
elm.value = value;
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
elm = headerFragment.getAll('#doctype')[0];
|
|
181
181
|
if (data.doctype) {
|
|
182
182
|
if (!elm) {
|
|
183
|
-
elm = new global$
|
|
183
|
+
elm = new global$1('#doctype', 10);
|
|
184
184
|
if (data.xml_pi) {
|
|
185
185
|
headerFragment.insert(elm, headerFragment.firstChild);
|
|
186
186
|
} else {
|
|
@@ -192,14 +192,14 @@
|
|
|
192
192
|
elm.remove();
|
|
193
193
|
}
|
|
194
194
|
elm = null;
|
|
195
|
-
global$
|
|
195
|
+
global$3.each(headerFragment.getAll('meta'), function (meta) {
|
|
196
196
|
if (meta.attr('http-equiv') === 'Content-Type') {
|
|
197
197
|
elm = meta;
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
if (data.docencoding) {
|
|
201
201
|
if (!elm) {
|
|
202
|
-
elm = new global$
|
|
202
|
+
elm = new global$1('meta', 1);
|
|
203
203
|
elm.attr('http-equiv', 'Content-Type');
|
|
204
204
|
elm.shortEnded = true;
|
|
205
205
|
addHeadNode(elm);
|
|
@@ -211,16 +211,16 @@
|
|
|
211
211
|
elm = headerFragment.getAll('title')[0];
|
|
212
212
|
if (data.title) {
|
|
213
213
|
if (!elm) {
|
|
214
|
-
elm = new global$
|
|
214
|
+
elm = new global$1('title', 1);
|
|
215
215
|
addHeadNode(elm);
|
|
216
216
|
} else {
|
|
217
217
|
elm.empty();
|
|
218
218
|
}
|
|
219
|
-
elm.append(new global$
|
|
219
|
+
elm.append(new global$1('#text', 3)).value = data.title;
|
|
220
220
|
} else if (elm) {
|
|
221
221
|
elm.remove();
|
|
222
222
|
}
|
|
223
|
-
global$
|
|
223
|
+
global$3.each('keywords,description,author,copyright,robots'.split(','), function (name) {
|
|
224
224
|
var nodes = headerFragment.getAll('meta');
|
|
225
225
|
var i, meta;
|
|
226
226
|
var value = data[name];
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
if (value) {
|
|
239
|
-
elm = new global$
|
|
239
|
+
elm = new global$1('meta', 1);
|
|
240
240
|
elm.attr('name', name);
|
|
241
241
|
elm.attr('content', value);
|
|
242
242
|
elm.shortEnded = true;
|
|
@@ -244,14 +244,14 @@
|
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
246
|
var currentStyleSheetsMap = {};
|
|
247
|
-
global$
|
|
247
|
+
global$3.each(headerFragment.getAll('link'), function (stylesheet) {
|
|
248
248
|
if (stylesheet.attr('rel') === 'stylesheet') {
|
|
249
249
|
currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet;
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
global$
|
|
252
|
+
global$3.each(data.stylesheets, function (stylesheet) {
|
|
253
253
|
if (!currentStyleSheetsMap[stylesheet]) {
|
|
254
|
-
elm = new global$
|
|
254
|
+
elm = new global$1('link', 1);
|
|
255
255
|
elm.attr({
|
|
256
256
|
rel: 'stylesheet',
|
|
257
257
|
text: 'text/css',
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
}
|
|
263
263
|
delete currentStyleSheetsMap[stylesheet];
|
|
264
264
|
});
|
|
265
|
-
global$
|
|
265
|
+
global$3.each(currentStyleSheetsMap, function (stylesheet) {
|
|
266
266
|
stylesheet.remove();
|
|
267
267
|
});
|
|
268
268
|
elm = headerFragment.getAll('body')[0];
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
if (!headElement.firstChild) {
|
|
289
289
|
headElement.remove();
|
|
290
290
|
}
|
|
291
|
-
var html = global
|
|
291
|
+
var html = global({
|
|
292
292
|
validate: false,
|
|
293
293
|
indent: true,
|
|
294
294
|
indent_before: 'head,html,body,meta,title,script,link,style',
|
|
@@ -362,21 +362,21 @@
|
|
|
362
362
|
initialData: initialData,
|
|
363
363
|
onSubmit: function (api) {
|
|
364
364
|
var nuData = api.getData();
|
|
365
|
-
var headHtml = dataToHtml(editor, global$
|
|
365
|
+
var headHtml = dataToHtml(editor, global$3.extend(data, nuData), headState.get());
|
|
366
366
|
headState.set(headHtml);
|
|
367
367
|
api.close();
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
var register = function (editor, headState) {
|
|
372
|
+
var register$1 = function (editor, headState) {
|
|
373
373
|
editor.addCommand('mceFullPageProperties', function () {
|
|
374
374
|
open(editor, headState);
|
|
375
375
|
});
|
|
376
376
|
};
|
|
377
377
|
|
|
378
378
|
var protectHtml = function (protect, html) {
|
|
379
|
-
global$
|
|
379
|
+
global$3.each(protect, function (pattern) {
|
|
380
380
|
html = html.replace(pattern, function (str) {
|
|
381
381
|
return '<!--mce:protected ' + escape(str) + '-->';
|
|
382
382
|
});
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
});
|
|
390
390
|
};
|
|
391
391
|
|
|
392
|
-
var each = global$
|
|
392
|
+
var each = global$3.each;
|
|
393
393
|
var low = function (s) {
|
|
394
394
|
return s.replace(/<\/?[A-Z]+/g, function (a) {
|
|
395
395
|
return a.toLowerCase();
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
if (content.length === 0 && !evt.source_view) {
|
|
412
|
-
content = global$
|
|
412
|
+
content = global$3.trim(headState.get()) + '\n' + global$3.trim(content) + '\n' + global$3.trim(footState.get());
|
|
413
413
|
}
|
|
414
414
|
content = content.replace(/<(\/?)BODY/gi, '<$1body');
|
|
415
415
|
startPos = content.indexOf('<body');
|
|
@@ -420,13 +420,13 @@
|
|
|
420
420
|
if (endPos === -1) {
|
|
421
421
|
endPos = content.length;
|
|
422
422
|
}
|
|
423
|
-
evt.content = global$
|
|
423
|
+
evt.content = global$3.trim(content.substring(startPos + 1, endPos));
|
|
424
424
|
footState.set(low(content.substring(endPos)));
|
|
425
425
|
} else {
|
|
426
426
|
headState.set(getDefaultHeader(editor));
|
|
427
427
|
footState.set('\n</body>\n</html>');
|
|
428
428
|
}
|
|
429
|
-
var headerFragment = parseHeader(headState.get());
|
|
429
|
+
var headerFragment = parseHeader(editor, headState.get());
|
|
430
430
|
each(headerFragment.getAll('style'), function (node) {
|
|
431
431
|
if (node.firstChild) {
|
|
432
432
|
styles += node.firstChild.value;
|
|
@@ -449,12 +449,12 @@
|
|
|
449
449
|
styleElm.appendChild(document.createTextNode(styles));
|
|
450
450
|
}
|
|
451
451
|
var currentStyleSheetsMap = {};
|
|
452
|
-
global$
|
|
452
|
+
global$3.each(headElm.getElementsByTagName('link'), function (stylesheet) {
|
|
453
453
|
if (stylesheet.rel === 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) {
|
|
454
454
|
currentStyleSheetsMap[stylesheet.href] = stylesheet;
|
|
455
455
|
}
|
|
456
456
|
});
|
|
457
|
-
global$
|
|
457
|
+
global$3.each(headerFragment.getAll('link'), function (stylesheet) {
|
|
458
458
|
var href = stylesheet.attr('href');
|
|
459
459
|
if (!href) {
|
|
460
460
|
return true;
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
}
|
|
470
470
|
delete currentStyleSheetsMap[href];
|
|
471
471
|
});
|
|
472
|
-
global$
|
|
472
|
+
global$3.each(currentStyleSheetsMap, function (stylesheet) {
|
|
473
473
|
stylesheet.parentNode.removeChild(stylesheet);
|
|
474
474
|
});
|
|
475
475
|
};
|
|
@@ -501,7 +501,7 @@
|
|
|
501
501
|
};
|
|
502
502
|
var handleGetContent = function (editor, head, foot, evt) {
|
|
503
503
|
if (evt.format === 'html' && !evt.selection && (!evt.source_view || !shouldHideInSourceView(editor))) {
|
|
504
|
-
evt.content = unprotectHtml(global$
|
|
504
|
+
evt.content = unprotectHtml(global$3.trim(head) + '\n' + global$3.trim(evt.content) + '\n' + global$3.trim(foot));
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
507
|
var setup = function (editor, headState, footState) {
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
});
|
|
514
514
|
};
|
|
515
515
|
|
|
516
|
-
var register
|
|
516
|
+
var register = function (editor) {
|
|
517
517
|
editor.ui.registry.addButton('fullpage', {
|
|
518
518
|
tooltip: 'Metadata and document properties',
|
|
519
519
|
icon: 'document-properties',
|
|
@@ -531,10 +531,10 @@
|
|
|
531
531
|
};
|
|
532
532
|
|
|
533
533
|
function Plugin () {
|
|
534
|
-
global.add('fullpage', function (editor) {
|
|
534
|
+
global$4.add('fullpage', function (editor) {
|
|
535
535
|
var headState = Cell(''), footState = Cell('');
|
|
536
|
-
register(editor, headState);
|
|
537
|
-
register
|
|
536
|
+
register$1(editor, headState);
|
|
537
|
+
register(editor);
|
|
538
538
|
setup(editor, headState, footState);
|
|
539
539
|
});
|
|
540
540
|
}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";
|
|
9
|
+
!function(){"use strict";function i(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function _(e){return e.getParam("fullpage_hide_in_source_view")}function b(e){return e.getParam("fullpage_default_encoding")}function x(e){return e.getParam("fullpage_default_font_family")}function k(e){return e.getParam("fullpage_default_font_size")}function C(e,t){return n({validate:!1,root_name:"#document"},e.schema).parse(t,{format:"xhtml"})}function c(u,m){u.addCommand("mceFullPageProperties",function(){var l,i,o,e,t,n,r,a,c,s;function d(e,t){return e.attr(t)||""}t=l=u,n=(i=m).get(),c=C(t,n),(s={}).fontface=x(t),s.fontsize=k(t),7===(r=c.firstChild).type&&(s.xml_pi=!0,(a=/encoding="([^"]+)"/.exec(r.value))&&(s.docencoding=a[1])),(r=c.getAll("#doctype")[0])&&(s.doctype="<!DOCTYPE"+r.value+">"),(r=c.getAll("title")[0])&&r.firstChild&&(s.title=r.firstChild.value),w.each(c.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?s[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(s.docencoding=t[1])}),(r=c.getAll("html")[0])&&(s.langcode=d(r,"lang")||d(r,"xml:lang")),s.stylesheets=[],w.each(c.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&s.stylesheets.push(e.attr("href"))}),(r=c.getAll("body")[0])&&(s.langdir=d(r,"dir"),s.style=d(r,"style"),s.visited_color=d(r,"vlink"),s.link_color=d(r,"link"),s.active_color=d(r,"alink")),o=s,e=g(g({},{title:"",keywords:"",description:"",robots:"",author:"",docencoding:""}),o),l.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:e,onSubmit:function(e){var t=e.getData(),n=function(e,o,t){function n(e,t,n){e.attr(t,n||void 0)}function r(e){s.firstChild?s.insert(e,s.firstChild):s.append(e)}var a,l,i=e.dom,c=C(e,t),s=c.getAll("head")[0];s||(a=c.getAll("html")[0],s=new f("head",1),a.firstChild?a.insert(s,a.firstChild,!0):a.append(s)),a=c.firstChild,o.xml_pi?(l='version="1.0"',o.docencoding&&(l+=' encoding="'+o.docencoding+'"'),7!==a.type&&(a=new f("xml",7),c.insert(a,c.firstChild,!0)),a.value=l):a&&7===a.type&&a.remove(),a=c.getAll("#doctype")[0],o.doctype?(a||(a=new f("#doctype",10),o.xml_pi?c.insert(a,c.firstChild):r(a)),a.value=o.doctype.substring(9,o.doctype.length-1)):a&&a.remove(),a=null,w.each(c.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),o.docencoding?(a||((a=new f("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,r(a)),a.attr("content","text/html; charset="+o.docencoding)):a&&a.remove(),a=c.getAll("title")[0],o.title?(a?a.empty():r(a=new f("title",1)),a.append(new f("#text",3)).value=o.title):a&&a.remove(),w.each("keywords,description,author,copyright,robots".split(","),function(e){for(var t,n=c.getAll("meta"),l=o[e],i=0;i<n.length;i++)if((t=n[i]).attr("name")===e)return void(l?t.attr("content",l):t.remove());l&&((a=new f("meta",1)).attr("name",e),a.attr("content",l),a.shortEnded=!0,r(a))});var d={};w.each(c.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(d[e.attr("href")]=e)}),w.each(o.stylesheets,function(e){d[e]||((a=new f("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,r(a)),delete d[e]}),w.each(d,function(e){e.remove()}),(a=c.getAll("body")[0])&&(n(a,"dir",o.langdir),n(a,"style",o.style),n(a,"vlink",o.visited_color),n(a,"link",o.link_color),n(a,"alink",o.active_color),i.setAttribs(e.getBody(),{style:o.style,dir:o.dir,vLink:o.visited_color,link:o.link_color,aLink:o.active_color})),(a=c.getAll("html")[0])&&(n(a,"lang",o.langcode),n(a,"xml:lang",o.langcode)),s.firstChild||s.remove();var u=p({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(c);return u.substring(0,u.indexOf("</body>"))}(l,w.extend(o,t),i.get());i.set(n),e.close()}})})}function A(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}function s(e,t,n,l){var i,o,r,a,c,s,d,u,m,g,f,p,h,y="",v=e.dom;l.selection||(a=e.getParam("protect"),c=l.content,w.each(a,function(e){c=c.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),r=c,"raw"===l.format&&t.get()||l.source_view&&_(e)||(-1!==(i=(r=(r=0!==r.length||l.source_view?r:w.trim(t.get())+"\n"+w.trim(r)+"\n"+w.trim(n.get())).replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=r.indexOf(">",i),t.set(A(r.substring(0,i+1))),-1===(o=r.indexOf("</body",i))&&(o=r.length),l.content=w.trim(r.substring(i+1,o)),n.set(A(r.substring(o)))):(t.set((h=p="",(g=e).getParam("fullpage_default_xml_pi")&&(p+='<?xml version="1.0" encoding="'+(b(g)||"ISO-8859-1")+'" ?>\n'),p+=g.getParam("fullpage_default_doctype","<!DOCTYPE html>"),p+="\n<html>\n<head>\n",(f=g.getParam("fullpage_default_title"))&&(p+="<title>"+f+"</title>\n"),(f=b(g))&&(p+='<meta http-equiv="Content-Type" content="text/html; charset='+f+'" />\n'),(f=x(g))&&(h+="font-family: "+f+";"),(f=k(g))&&(h+="font-size: "+f+";"),(f=g.getParam("fullpage_default_text_color"))&&(h+="color: "+f+";"),p+="</head>\n<body"+(h?' style="'+h+'"':"")+">\n")),n.set("\n</body>\n</html>")),s=C(e,t.get()),P(s.getAll("style"),function(e){e.firstChild&&(y+=e.firstChild.value)}),(d=s.getAll("body")[0])&&v.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),v.remove("fullpage_styles"),u=e.getDoc().getElementsByTagName("head")[0],y&&v.add(u,"style",{id:"fullpage_styles"}).appendChild(document.createTextNode(y)),m={},w.each(u.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(m[e.href]=e)}),w.each(s.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;m[t]||"stylesheet"!==e.attr("rel")||v.add(u,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete m[t]}),w.each(m,function(e){e.parentNode.removeChild(e)})))}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=function(){return(g=Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},w=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=tinymce.util.Tools.resolve("tinymce.html.DomParser"),f=tinymce.util.Tools.resolve("tinymce.html.Node"),p=tinymce.util.Tools.resolve("tinymce.html.Serializer"),P=w.each;e.add("fullpage",function(e){var t,o,r,a,n=i(""),l=i("");c(e,n),(t=e).ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}}),t.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}}),r=n,a=l,(o=e).on("BeforeSetContent",function(e){s(o,r,a,e)}),o.on("GetContent",function(e){var t,n,l,i;t=o,n=r.get(),l=a.get(),"html"!==(i=e).format||i.selection||i.source_view&&_(t)||(i.content=(w.trim(n)+"\n"+w.trim(i.content)+"\n"+w.trim(l)).replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)}))})})}();
|