@dangl/angular-material-shared 2.5.1-beta0012 → 2.6.0-beta0019
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/README.md +1 -7
- package/esm2022/lib/angular-material-shared.module.mjs +2 -2
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
- package/package.json +1 -1
- package/tinymce-assets/icons/default/icons.js +187 -171
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/it.js +1 -1
- package/tinymce-assets/plugins/accordion/index.js +7 -0
- package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
- package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
- package/tinymce-assets/plugins/advlist/plugin.js +185 -187
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
- package/tinymce-assets/plugins/anchor/plugin.js +79 -81
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autolink/plugin.js +209 -194
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autosave/plugin.js +125 -104
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
- package/tinymce-assets/plugins/charmap/plugin.js +275 -313
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
- package/tinymce-assets/plugins/code/plugin.js +18 -24
- package/tinymce-assets/plugins/code/plugin.min.js +2 -7
- package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
- package/tinymce-assets/plugins/directionality/plugin.js +247 -305
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
- package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/tinymce-assets/plugins/help/plugin.js +411 -355
- package/tinymce-assets/plugins/help/plugin.min.js +2 -7
- package/tinymce-assets/plugins/image/plugin.js +876 -1037
- package/tinymce-assets/plugins/image/plugin.min.js +2 -7
- package/tinymce-assets/plugins/importcss/plugin.js +146 -144
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
- package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
- package/tinymce-assets/plugins/link/plugin.js +718 -768
- package/tinymce-assets/plugins/link/plugin.min.js +2 -7
- package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
- package/tinymce-assets/plugins/media/plugin.js +614 -756
- package/tinymce-assets/plugins/media/plugin.min.js +2 -7
- package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
- package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
- package/tinymce-assets/plugins/preview/plugin.js +36 -65
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
- package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/save/plugin.js +49 -50
- package/tinymce-assets/plugins/save/plugin.min.js +2 -7
- package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
- package/tinymce-assets/plugins/table/plugin.js +2572 -10617
- package/tinymce-assets/plugins/table/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
- package/tinymce-assets/skins/content/dark/content.css +2 -8
- package/tinymce-assets/skins/content/dark/content.js +2 -0
- package/tinymce-assets/skins/content/dark/content.min.css +1 -7
- package/tinymce-assets/skins/content/default/content.css +0 -6
- package/tinymce-assets/skins/content/default/content.js +2 -0
- package/tinymce-assets/skins/content/default/content.min.css +0 -6
- package/tinymce-assets/skins/content/document/content.css +0 -6
- package/tinymce-assets/skins/content/document/content.js +2 -0
- package/tinymce-assets/skins/content/document/content.min.css +0 -6
- package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
- package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/content/writer/content.css +0 -6
- package/tinymce-assets/skins/content/writer/content.js +2 -0
- package/tinymce-assets/skins/content/writer/content.min.css +0 -6
- package/tinymce-assets/skins/ui/oxide/content.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
- package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/themes/silver/theme.js +25226 -28188
- package/tinymce-assets/themes/silver/theme.min.js +2 -7
- package/tinymce-assets/plugins/bbcode/index.js +0 -7
- package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
- package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
- package/tinymce-assets/plugins/colorpicker/index.js +0 -7
- package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/contextmenu/index.js +0 -7
- package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
- package/tinymce-assets/plugins/fullpage/index.js +0 -7
- package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
- package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
- package/tinymce-assets/plugins/hr/index.js +0 -7
- package/tinymce-assets/plugins/hr/plugin.js +0 -45
- package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
- package/tinymce-assets/plugins/imagetools/index.js +0 -7
- package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
- package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
- package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
- package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
- package/tinymce-assets/plugins/noneditable/index.js +0 -7
- package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
- package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
- package/tinymce-assets/plugins/paste/index.js +0 -7
- package/tinymce-assets/plugins/paste/plugin.js +0 -1803
- package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
- package/tinymce-assets/plugins/print/index.js +0 -7
- package/tinymce-assets/plugins/print/plugin.js +0 -52
- package/tinymce-assets/plugins/print/plugin.min.js +0 -9
- package/tinymce-assets/plugins/spellchecker/index.js +0 -7
- package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/tabfocus/index.js +0 -7
- package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
- package/tinymce-assets/plugins/template/index.js +0 -7
- package/tinymce-assets/plugins/template/plugin.js +0 -591
- package/tinymce-assets/plugins/template/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textcolor/index.js +0 -7
- package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
- package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textpattern/index.js +0 -7
- package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
- package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
- package/tinymce-assets/plugins/toc/index.js +0 -7
- package/tinymce-assets/plugins/toc/plugin.js +0 -238
- package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
- package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
- package/tinymce-assets/themes/mobile/index.js +0 -7
- package/tinymce-assets/themes/mobile/theme.js +0 -13130
- package/tinymce-assets/themes/mobile/theme.min.js +0 -9
|
@@ -1,544 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
8
|
-
*/
|
|
9
|
-
(function () {
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
var Cell = function (initial) {
|
|
13
|
-
var value = initial;
|
|
14
|
-
var get = function () {
|
|
15
|
-
return value;
|
|
16
|
-
};
|
|
17
|
-
var set = function (v) {
|
|
18
|
-
value = v;
|
|
19
|
-
};
|
|
20
|
-
return {
|
|
21
|
-
get: get,
|
|
22
|
-
set: set
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
|
-
|
|
28
|
-
var __assign = function () {
|
|
29
|
-
__assign = Object.assign || function __assign(t) {
|
|
30
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31
|
-
s = arguments[i];
|
|
32
|
-
for (var p in s)
|
|
33
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
34
|
-
t[p] = s[p];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
|
-
return __assign.apply(this, arguments);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
42
|
-
|
|
43
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
|
|
44
|
-
|
|
45
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
|
46
|
-
|
|
47
|
-
var global = tinymce.util.Tools.resolve('tinymce.html.Serializer');
|
|
48
|
-
|
|
49
|
-
var shouldHideInSourceView = function (editor) {
|
|
50
|
-
return editor.getParam('fullpage_hide_in_source_view');
|
|
51
|
-
};
|
|
52
|
-
var getDefaultXmlPi = function (editor) {
|
|
53
|
-
return editor.getParam('fullpage_default_xml_pi');
|
|
54
|
-
};
|
|
55
|
-
var getDefaultEncoding = function (editor) {
|
|
56
|
-
return editor.getParam('fullpage_default_encoding');
|
|
57
|
-
};
|
|
58
|
-
var getDefaultFontFamily = function (editor) {
|
|
59
|
-
return editor.getParam('fullpage_default_font_family');
|
|
60
|
-
};
|
|
61
|
-
var getDefaultFontSize = function (editor) {
|
|
62
|
-
return editor.getParam('fullpage_default_font_size');
|
|
63
|
-
};
|
|
64
|
-
var getDefaultTextColor = function (editor) {
|
|
65
|
-
return editor.getParam('fullpage_default_text_color');
|
|
66
|
-
};
|
|
67
|
-
var getDefaultTitle = function (editor) {
|
|
68
|
-
return editor.getParam('fullpage_default_title');
|
|
69
|
-
};
|
|
70
|
-
var getDefaultDocType = function (editor) {
|
|
71
|
-
return editor.getParam('fullpage_default_doctype', '<!DOCTYPE html>');
|
|
72
|
-
};
|
|
73
|
-
var getProtect = function (editor) {
|
|
74
|
-
return editor.getParam('protect');
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
var parseHeader = function (editor, head) {
|
|
78
|
-
return global$2({
|
|
79
|
-
validate: false,
|
|
80
|
-
root_name: '#document'
|
|
81
|
-
}, editor.schema).parse(head, { format: 'xhtml' });
|
|
82
|
-
};
|
|
83
|
-
var htmlToData = function (editor, head) {
|
|
84
|
-
var headerFragment = parseHeader(editor, head);
|
|
85
|
-
var data = {};
|
|
86
|
-
var elm, matches;
|
|
87
|
-
var getAttr = function (elm, name) {
|
|
88
|
-
var value = elm.attr(name);
|
|
89
|
-
return value || '';
|
|
90
|
-
};
|
|
91
|
-
data.fontface = getDefaultFontFamily(editor);
|
|
92
|
-
data.fontsize = getDefaultFontSize(editor);
|
|
93
|
-
elm = headerFragment.firstChild;
|
|
94
|
-
if (elm.type === 7) {
|
|
95
|
-
data.xml_pi = true;
|
|
96
|
-
matches = /encoding="([^"]+)"/.exec(elm.value);
|
|
97
|
-
if (matches) {
|
|
98
|
-
data.docencoding = matches[1];
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
elm = headerFragment.getAll('#doctype')[0];
|
|
102
|
-
if (elm) {
|
|
103
|
-
data.doctype = '<!DOCTYPE' + elm.value + '>';
|
|
104
|
-
}
|
|
105
|
-
elm = headerFragment.getAll('title')[0];
|
|
106
|
-
if (elm && elm.firstChild) {
|
|
107
|
-
data.title = elm.firstChild.value;
|
|
108
|
-
}
|
|
109
|
-
global$3.each(headerFragment.getAll('meta'), function (meta) {
|
|
110
|
-
var name = meta.attr('name');
|
|
111
|
-
var httpEquiv = meta.attr('http-equiv');
|
|
112
|
-
var matches;
|
|
113
|
-
if (name) {
|
|
114
|
-
data[name.toLowerCase()] = meta.attr('content');
|
|
115
|
-
} else if (httpEquiv === 'Content-Type') {
|
|
116
|
-
matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
|
|
117
|
-
if (matches) {
|
|
118
|
-
data.docencoding = matches[1];
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
elm = headerFragment.getAll('html')[0];
|
|
123
|
-
if (elm) {
|
|
124
|
-
data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
|
|
125
|
-
}
|
|
126
|
-
data.stylesheets = [];
|
|
127
|
-
global$3.each(headerFragment.getAll('link'), function (link) {
|
|
128
|
-
if (link.attr('rel') === 'stylesheet') {
|
|
129
|
-
data.stylesheets.push(link.attr('href'));
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
elm = headerFragment.getAll('body')[0];
|
|
133
|
-
if (elm) {
|
|
134
|
-
data.langdir = getAttr(elm, 'dir');
|
|
135
|
-
data.style = getAttr(elm, 'style');
|
|
136
|
-
data.visited_color = getAttr(elm, 'vlink');
|
|
137
|
-
data.link_color = getAttr(elm, 'link');
|
|
138
|
-
data.active_color = getAttr(elm, 'alink');
|
|
139
|
-
}
|
|
140
|
-
return data;
|
|
141
|
-
};
|
|
142
|
-
var dataToHtml = function (editor, data, head) {
|
|
143
|
-
var headElement, elm;
|
|
144
|
-
var dom = editor.dom;
|
|
145
|
-
var setAttr = function (elm, name, value) {
|
|
146
|
-
elm.attr(name, value ? value : undefined);
|
|
147
|
-
};
|
|
148
|
-
var addHeadNode = function (node) {
|
|
149
|
-
if (headElement.firstChild) {
|
|
150
|
-
headElement.insert(node, headElement.firstChild);
|
|
151
|
-
} else {
|
|
152
|
-
headElement.append(node);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
var headerFragment = parseHeader(editor, head);
|
|
156
|
-
headElement = headerFragment.getAll('head')[0];
|
|
157
|
-
if (!headElement) {
|
|
158
|
-
elm = headerFragment.getAll('html')[0];
|
|
159
|
-
headElement = new global$1('head', 1);
|
|
160
|
-
if (elm.firstChild) {
|
|
161
|
-
elm.insert(headElement, elm.firstChild, true);
|
|
162
|
-
} else {
|
|
163
|
-
elm.append(headElement);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
elm = headerFragment.firstChild;
|
|
167
|
-
if (data.xml_pi) {
|
|
168
|
-
var value = 'version="1.0"';
|
|
169
|
-
if (data.docencoding) {
|
|
170
|
-
value += ' encoding="' + data.docencoding + '"';
|
|
171
|
-
}
|
|
172
|
-
if (elm.type !== 7) {
|
|
173
|
-
elm = new global$1('xml', 7);
|
|
174
|
-
headerFragment.insert(elm, headerFragment.firstChild, true);
|
|
175
|
-
}
|
|
176
|
-
elm.value = value;
|
|
177
|
-
} else if (elm && elm.type === 7) {
|
|
178
|
-
elm.remove();
|
|
179
|
-
}
|
|
180
|
-
elm = headerFragment.getAll('#doctype')[0];
|
|
181
|
-
if (data.doctype) {
|
|
182
|
-
if (!elm) {
|
|
183
|
-
elm = new global$1('#doctype', 10);
|
|
184
|
-
if (data.xml_pi) {
|
|
185
|
-
headerFragment.insert(elm, headerFragment.firstChild);
|
|
186
|
-
} else {
|
|
187
|
-
addHeadNode(elm);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
elm.value = data.doctype.substring(9, data.doctype.length - 1);
|
|
191
|
-
} else if (elm) {
|
|
192
|
-
elm.remove();
|
|
193
|
-
}
|
|
194
|
-
elm = null;
|
|
195
|
-
global$3.each(headerFragment.getAll('meta'), function (meta) {
|
|
196
|
-
if (meta.attr('http-equiv') === 'Content-Type') {
|
|
197
|
-
elm = meta;
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
if (data.docencoding) {
|
|
201
|
-
if (!elm) {
|
|
202
|
-
elm = new global$1('meta', 1);
|
|
203
|
-
elm.attr('http-equiv', 'Content-Type');
|
|
204
|
-
elm.shortEnded = true;
|
|
205
|
-
addHeadNode(elm);
|
|
206
|
-
}
|
|
207
|
-
elm.attr('content', 'text/html; charset=' + data.docencoding);
|
|
208
|
-
} else if (elm) {
|
|
209
|
-
elm.remove();
|
|
210
|
-
}
|
|
211
|
-
elm = headerFragment.getAll('title')[0];
|
|
212
|
-
if (data.title) {
|
|
213
|
-
if (!elm) {
|
|
214
|
-
elm = new global$1('title', 1);
|
|
215
|
-
addHeadNode(elm);
|
|
216
|
-
} else {
|
|
217
|
-
elm.empty();
|
|
218
|
-
}
|
|
219
|
-
elm.append(new global$1('#text', 3)).value = data.title;
|
|
220
|
-
} else if (elm) {
|
|
221
|
-
elm.remove();
|
|
222
|
-
}
|
|
223
|
-
global$3.each('keywords,description,author,copyright,robots'.split(','), function (name) {
|
|
224
|
-
var nodes = headerFragment.getAll('meta');
|
|
225
|
-
var i, meta;
|
|
226
|
-
var value = data[name];
|
|
227
|
-
for (i = 0; i < nodes.length; i++) {
|
|
228
|
-
meta = nodes[i];
|
|
229
|
-
if (meta.attr('name') === name) {
|
|
230
|
-
if (value) {
|
|
231
|
-
meta.attr('content', value);
|
|
232
|
-
} else {
|
|
233
|
-
meta.remove();
|
|
234
|
-
}
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
if (value) {
|
|
239
|
-
elm = new global$1('meta', 1);
|
|
240
|
-
elm.attr('name', name);
|
|
241
|
-
elm.attr('content', value);
|
|
242
|
-
elm.shortEnded = true;
|
|
243
|
-
addHeadNode(elm);
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
var currentStyleSheetsMap = {};
|
|
247
|
-
global$3.each(headerFragment.getAll('link'), function (stylesheet) {
|
|
248
|
-
if (stylesheet.attr('rel') === 'stylesheet') {
|
|
249
|
-
currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet;
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
global$3.each(data.stylesheets, function (stylesheet) {
|
|
253
|
-
if (!currentStyleSheetsMap[stylesheet]) {
|
|
254
|
-
elm = new global$1('link', 1);
|
|
255
|
-
elm.attr({
|
|
256
|
-
rel: 'stylesheet',
|
|
257
|
-
text: 'text/css',
|
|
258
|
-
href: stylesheet
|
|
259
|
-
});
|
|
260
|
-
elm.shortEnded = true;
|
|
261
|
-
addHeadNode(elm);
|
|
262
|
-
}
|
|
263
|
-
delete currentStyleSheetsMap[stylesheet];
|
|
264
|
-
});
|
|
265
|
-
global$3.each(currentStyleSheetsMap, function (stylesheet) {
|
|
266
|
-
stylesheet.remove();
|
|
267
|
-
});
|
|
268
|
-
elm = headerFragment.getAll('body')[0];
|
|
269
|
-
if (elm) {
|
|
270
|
-
setAttr(elm, 'dir', data.langdir);
|
|
271
|
-
setAttr(elm, 'style', data.style);
|
|
272
|
-
setAttr(elm, 'vlink', data.visited_color);
|
|
273
|
-
setAttr(elm, 'link', data.link_color);
|
|
274
|
-
setAttr(elm, 'alink', data.active_color);
|
|
275
|
-
dom.setAttribs(editor.getBody(), {
|
|
276
|
-
style: data.style,
|
|
277
|
-
dir: data.dir,
|
|
278
|
-
vLink: data.visited_color,
|
|
279
|
-
link: data.link_color,
|
|
280
|
-
aLink: data.active_color
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
elm = headerFragment.getAll('html')[0];
|
|
284
|
-
if (elm) {
|
|
285
|
-
setAttr(elm, 'lang', data.langcode);
|
|
286
|
-
setAttr(elm, 'xml:lang', data.langcode);
|
|
287
|
-
}
|
|
288
|
-
if (!headElement.firstChild) {
|
|
289
|
-
headElement.remove();
|
|
290
|
-
}
|
|
291
|
-
var html = global({
|
|
292
|
-
validate: false,
|
|
293
|
-
indent: true,
|
|
294
|
-
indent_before: 'head,html,body,meta,title,script,link,style',
|
|
295
|
-
indent_after: 'head,html,body,meta,title,script,link,style'
|
|
296
|
-
}).serialize(headerFragment);
|
|
297
|
-
return html.substring(0, html.indexOf('</body>'));
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
var open = function (editor, headState) {
|
|
301
|
-
var data = htmlToData(editor, headState.get());
|
|
302
|
-
var defaultData = {
|
|
303
|
-
title: '',
|
|
304
|
-
keywords: '',
|
|
305
|
-
description: '',
|
|
306
|
-
robots: '',
|
|
307
|
-
author: '',
|
|
308
|
-
docencoding: ''
|
|
309
|
-
};
|
|
310
|
-
var initialData = __assign(__assign({}, defaultData), data);
|
|
311
|
-
editor.windowManager.open({
|
|
312
|
-
title: 'Metadata and Document Properties',
|
|
313
|
-
size: 'normal',
|
|
314
|
-
body: {
|
|
315
|
-
type: 'panel',
|
|
316
|
-
items: [
|
|
317
|
-
{
|
|
318
|
-
name: 'title',
|
|
319
|
-
type: 'input',
|
|
320
|
-
label: 'Title'
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: 'keywords',
|
|
324
|
-
type: 'input',
|
|
325
|
-
label: 'Keywords'
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
name: 'description',
|
|
329
|
-
type: 'input',
|
|
330
|
-
label: 'Description'
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
name: 'robots',
|
|
334
|
-
type: 'input',
|
|
335
|
-
label: 'Robots'
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
name: 'author',
|
|
339
|
-
type: 'input',
|
|
340
|
-
label: 'Author'
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
name: 'docencoding',
|
|
344
|
-
type: 'input',
|
|
345
|
-
label: 'Encoding'
|
|
346
|
-
}
|
|
347
|
-
]
|
|
348
|
-
},
|
|
349
|
-
buttons: [
|
|
350
|
-
{
|
|
351
|
-
type: 'cancel',
|
|
352
|
-
name: 'cancel',
|
|
353
|
-
text: 'Cancel'
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
type: 'submit',
|
|
357
|
-
name: 'save',
|
|
358
|
-
text: 'Save',
|
|
359
|
-
primary: true
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
initialData: initialData,
|
|
363
|
-
onSubmit: function (api) {
|
|
364
|
-
var nuData = api.getData();
|
|
365
|
-
var headHtml = dataToHtml(editor, global$3.extend(data, nuData), headState.get());
|
|
366
|
-
headState.set(headHtml);
|
|
367
|
-
api.close();
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
var register$1 = function (editor, headState) {
|
|
373
|
-
editor.addCommand('mceFullPageProperties', function () {
|
|
374
|
-
open(editor, headState);
|
|
375
|
-
});
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
var protectHtml = function (protect, html) {
|
|
379
|
-
global$3.each(protect, function (pattern) {
|
|
380
|
-
html = html.replace(pattern, function (str) {
|
|
381
|
-
return '<!--mce:protected ' + escape(str) + '-->';
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
return html;
|
|
385
|
-
};
|
|
386
|
-
var unprotectHtml = function (html) {
|
|
387
|
-
return html.replace(/<!--mce:protected ([\s\S]*?)-->/g, function (a, m) {
|
|
388
|
-
return unescape(m);
|
|
389
|
-
});
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
var each = global$3.each;
|
|
393
|
-
var low = function (s) {
|
|
394
|
-
return s.replace(/<\/?[A-Z]+/g, function (a) {
|
|
395
|
-
return a.toLowerCase();
|
|
396
|
-
});
|
|
397
|
-
};
|
|
398
|
-
var handleSetContent = function (editor, headState, footState, evt) {
|
|
399
|
-
var startPos, endPos, content, styles = '';
|
|
400
|
-
var dom = editor.dom;
|
|
401
|
-
if (evt.selection) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
content = protectHtml(getProtect(editor), evt.content);
|
|
405
|
-
if (evt.format === 'raw' && headState.get()) {
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
if (evt.source_view && shouldHideInSourceView(editor)) {
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
if (content.length === 0 && !evt.source_view) {
|
|
412
|
-
content = global$3.trim(headState.get()) + '\n' + global$3.trim(content) + '\n' + global$3.trim(footState.get());
|
|
413
|
-
}
|
|
414
|
-
content = content.replace(/<(\/?)BODY/gi, '<$1body');
|
|
415
|
-
startPos = content.indexOf('<body');
|
|
416
|
-
if (startPos !== -1) {
|
|
417
|
-
startPos = content.indexOf('>', startPos);
|
|
418
|
-
headState.set(low(content.substring(0, startPos + 1)));
|
|
419
|
-
endPos = content.indexOf('</body', startPos);
|
|
420
|
-
if (endPos === -1) {
|
|
421
|
-
endPos = content.length;
|
|
422
|
-
}
|
|
423
|
-
evt.content = global$3.trim(content.substring(startPos + 1, endPos));
|
|
424
|
-
footState.set(low(content.substring(endPos)));
|
|
425
|
-
} else {
|
|
426
|
-
headState.set(getDefaultHeader(editor));
|
|
427
|
-
footState.set('\n</body>\n</html>');
|
|
428
|
-
}
|
|
429
|
-
var headerFragment = parseHeader(editor, headState.get());
|
|
430
|
-
each(headerFragment.getAll('style'), function (node) {
|
|
431
|
-
if (node.firstChild) {
|
|
432
|
-
styles += node.firstChild.value;
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
var bodyElm = headerFragment.getAll('body')[0];
|
|
436
|
-
if (bodyElm) {
|
|
437
|
-
dom.setAttribs(editor.getBody(), {
|
|
438
|
-
style: bodyElm.attr('style') || '',
|
|
439
|
-
dir: bodyElm.attr('dir') || '',
|
|
440
|
-
vLink: bodyElm.attr('vlink') || '',
|
|
441
|
-
link: bodyElm.attr('link') || '',
|
|
442
|
-
aLink: bodyElm.attr('alink') || ''
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
dom.remove('fullpage_styles');
|
|
446
|
-
var headElm = editor.getDoc().getElementsByTagName('head')[0];
|
|
447
|
-
if (styles) {
|
|
448
|
-
var styleElm = dom.add(headElm, 'style', { id: 'fullpage_styles' });
|
|
449
|
-
styleElm.appendChild(document.createTextNode(styles));
|
|
450
|
-
}
|
|
451
|
-
var currentStyleSheetsMap = {};
|
|
452
|
-
global$3.each(headElm.getElementsByTagName('link'), function (stylesheet) {
|
|
453
|
-
if (stylesheet.rel === 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) {
|
|
454
|
-
currentStyleSheetsMap[stylesheet.href] = stylesheet;
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
global$3.each(headerFragment.getAll('link'), function (stylesheet) {
|
|
458
|
-
var href = stylesheet.attr('href');
|
|
459
|
-
if (!href) {
|
|
460
|
-
return true;
|
|
461
|
-
}
|
|
462
|
-
if (!currentStyleSheetsMap[href] && stylesheet.attr('rel') === 'stylesheet') {
|
|
463
|
-
dom.add(headElm, 'link', {
|
|
464
|
-
'rel': 'stylesheet',
|
|
465
|
-
'text': 'text/css',
|
|
466
|
-
href: href,
|
|
467
|
-
'data-mce-fullpage': '1'
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
delete currentStyleSheetsMap[href];
|
|
471
|
-
});
|
|
472
|
-
global$3.each(currentStyleSheetsMap, function (stylesheet) {
|
|
473
|
-
stylesheet.parentNode.removeChild(stylesheet);
|
|
474
|
-
});
|
|
475
|
-
};
|
|
476
|
-
var getDefaultHeader = function (editor) {
|
|
477
|
-
var header = '', value, styles = '';
|
|
478
|
-
if (getDefaultXmlPi(editor)) {
|
|
479
|
-
var piEncoding = getDefaultEncoding(editor);
|
|
480
|
-
header += '<?xml version="1.0" encoding="' + (piEncoding ? piEncoding : 'ISO-8859-1') + '" ?>\n';
|
|
481
|
-
}
|
|
482
|
-
header += getDefaultDocType(editor);
|
|
483
|
-
header += '\n<html>\n<head>\n';
|
|
484
|
-
if (value = getDefaultTitle(editor)) {
|
|
485
|
-
header += '<title>' + value + '</title>\n';
|
|
486
|
-
}
|
|
487
|
-
if (value = getDefaultEncoding(editor)) {
|
|
488
|
-
header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
|
|
489
|
-
}
|
|
490
|
-
if (value = getDefaultFontFamily(editor)) {
|
|
491
|
-
styles += 'font-family: ' + value + ';';
|
|
492
|
-
}
|
|
493
|
-
if (value = getDefaultFontSize(editor)) {
|
|
494
|
-
styles += 'font-size: ' + value + ';';
|
|
495
|
-
}
|
|
496
|
-
if (value = getDefaultTextColor(editor)) {
|
|
497
|
-
styles += 'color: ' + value + ';';
|
|
498
|
-
}
|
|
499
|
-
header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
|
|
500
|
-
return header;
|
|
501
|
-
};
|
|
502
|
-
var handleGetContent = function (editor, head, foot, evt) {
|
|
503
|
-
if (evt.format === 'html' && !evt.selection && (!evt.source_view || !shouldHideInSourceView(editor))) {
|
|
504
|
-
evt.content = unprotectHtml(global$3.trim(head) + '\n' + global$3.trim(evt.content) + '\n' + global$3.trim(foot));
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
var setup = function (editor, headState, footState) {
|
|
508
|
-
editor.on('BeforeSetContent', function (evt) {
|
|
509
|
-
handleSetContent(editor, headState, footState, evt);
|
|
510
|
-
});
|
|
511
|
-
editor.on('GetContent', function (evt) {
|
|
512
|
-
handleGetContent(editor, headState.get(), footState.get(), evt);
|
|
513
|
-
});
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
var register = function (editor) {
|
|
517
|
-
editor.ui.registry.addButton('fullpage', {
|
|
518
|
-
tooltip: 'Metadata and document properties',
|
|
519
|
-
icon: 'document-properties',
|
|
520
|
-
onAction: function () {
|
|
521
|
-
editor.execCommand('mceFullPageProperties');
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
editor.ui.registry.addMenuItem('fullpage', {
|
|
525
|
-
text: 'Metadata and document properties',
|
|
526
|
-
icon: 'document-properties',
|
|
527
|
-
onAction: function () {
|
|
528
|
-
editor.execCommand('mceFullPageProperties');
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
};
|
|
532
|
-
|
|
533
|
-
function Plugin () {
|
|
534
|
-
global$4.add('fullpage', function (editor) {
|
|
535
|
-
var headState = Cell(''), footState = Cell('');
|
|
536
|
-
register$1(editor, headState);
|
|
537
|
-
register(editor);
|
|
538
|
-
setup(editor, headState, footState);
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
Plugin();
|
|
543
|
-
|
|
544
|
-
}());
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
8
|
-
*/
|
|
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)}))})})}();
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
8
|
-
*/
|
|
9
|
-
(function () {
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
|
-
|
|
14
|
-
var register$1 = function (editor) {
|
|
15
|
-
editor.addCommand('InsertHorizontalRule', function () {
|
|
16
|
-
editor.execCommand('mceInsertContent', false, '<hr />');
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
var register = function (editor) {
|
|
21
|
-
var onAction = function () {
|
|
22
|
-
return editor.execCommand('InsertHorizontalRule');
|
|
23
|
-
};
|
|
24
|
-
editor.ui.registry.addButton('hr', {
|
|
25
|
-
icon: 'horizontal-rule',
|
|
26
|
-
tooltip: 'Horizontal line',
|
|
27
|
-
onAction: onAction
|
|
28
|
-
});
|
|
29
|
-
editor.ui.registry.addMenuItem('hr', {
|
|
30
|
-
icon: 'horizontal-rule',
|
|
31
|
-
text: 'Horizontal line',
|
|
32
|
-
onAction: onAction
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
function Plugin () {
|
|
37
|
-
global.add('hr', function (editor) {
|
|
38
|
-
register$1(editor);
|
|
39
|
-
register(editor);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
Plugin();
|
|
44
|
-
|
|
45
|
-
}());
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
8
|
-
*/
|
|
9
|
-
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(n){var o,t;function e(){return t.execCommand("InsertHorizontalRule")}(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:e}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:e})})}();
|