Release 1.0.0-beta18

This commit is contained in:
codecalm
2023-05-14 16:02:06 +02:00
parent 75619ddf72
commit 966d75903d
535 changed files with 50766 additions and 107436 deletions
+17 -14
View File
@@ -1,11 +1,11 @@
/**
* TinyMCE version 6.3.1 (2022-12-06)
* TinyMCE version 6.4.2 (2023-04-26)
*/
(function () {
'use strict';
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
const hasProto = (v, constructor, predicate) => {
var _a;
@@ -62,7 +62,7 @@
const escape = text => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
const option = name => editor => editor.options.get(name);
const register$2 = editor => {
@@ -271,6 +271,8 @@
};
const has = (obj, key) => hasOwnProperty.call(obj, key);
var global$1 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
const entitiesAttr = {
'"': '"',
'<': '&lt;',
@@ -280,6 +282,7 @@
};
const htmlEscape = html => html.replace(/["'<>&]/g, match => get(entitiesAttr, match).getOr(match));
const hasAnyClasses = (dom, n, classes) => exists(classes.split(/\s+/), c => dom.hasClass(n, c));
const parseAndSerialize = (editor, html) => global$1({ validate: true }, editor.schema).serialize(editor.parser.parse(html, { insert: true }));
const createTemplateList = (editor, callback) => {
return () => {
@@ -298,7 +301,7 @@
};
};
const replaceTemplateValues = (html, templateValues) => {
global$1.each(templateValues, (v, k) => {
global$2.each(templateValues, (v, k) => {
if (isFunction(v)) {
v = v(k);
}
@@ -308,8 +311,8 @@
};
const replaceVals = (editor, scope) => {
const dom = editor.dom, vl = getTemplateReplaceValues(editor);
global$1.each(dom.select('*', scope), e => {
global$1.each(vl, (v, k) => {
global$2.each(dom.select('*', scope), e => {
global$2.each(vl, (v, k) => {
if (dom.hasClass(e, k)) {
if (isFunction(v)) {
v(e);
@@ -322,13 +325,13 @@
const dom = editor.dom;
const sel = editor.selection.getContent();
html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
let el = dom.create('div', {}, html);
let el = dom.create('div', {}, parseAndSerialize(editor, html));
const n = dom.select('.mceTmpl', el);
if (n && n.length > 0) {
el = dom.create('div');
el.appendChild(n[0].cloneNode(true));
}
global$1.each(dom.select('*', el), n => {
global$2.each(dom.select('*', el), n => {
if (hasAnyClasses(dom, n, getCreationDateClasses(editor))) {
n.innerHTML = getDateTime(editor, getCdateFormat(editor));
}
@@ -352,7 +355,7 @@
let contentCssEntries = '';
const contentStyle = (_a = getContentStyle(editor)) !== null && _a !== void 0 ? _a : '';
const cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
global$1.each(editor.contentCSS, url => {
global$2.each(editor.contentCSS, url => {
contentCssEntries += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '"' + cors + '>';
});
if (contentStyle) {
@@ -364,7 +367,7 @@
const preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> ';
const directionality = editor.getBody().dir;
const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
html = '<!DOCTYPE html>' + '<html>' + '<head>' + '<base href="' + encode(editor.documentBaseURI.getURI()) + '">' + contentCssEntries + preventClicksOnLinksScript + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + html + '</body>' + '</html>';
html = '<!DOCTYPE html>' + '<html>' + '<head>' + '<base href="' + encode(editor.documentBaseURI.getURI()) + '">' + contentCssEntries + preventClicksOnLinksScript + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + parseAndSerialize(editor, html) + '</body>' + '</html>';
}
return replaceTemplateValues(html, getPreviewReplaceValues(editor));
};
@@ -378,7 +381,7 @@
});
return Optional.none();
}
return Optional.from(global$1.map(templateList, (template, index) => {
return Optional.from(global$2.map(templateList, (template, index) => {
const isUrlTemplate = t => t.url !== undefined;
return {
selected: index === 0,
@@ -510,9 +513,9 @@
const setup = editor => {
editor.on('PreProcess', o => {
const dom = editor.dom, dateFormat = getMdateFormat(editor);
global$1.each(dom.select('div', o.node), e => {
global$2.each(dom.select('div', o.node), e => {
if (dom.hasClass(e, 'mceTmpl')) {
global$1.each(dom.select('*', e), e => {
global$2.each(dom.select('*', e), e => {
if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) {
e.innerHTML = getDateTime(editor, dateFormat);
}
@@ -538,7 +541,7 @@
};
var Plugin = () => {
global$2.add('template', editor => {
global$3.add('template', editor => {
register$2(editor);
register(editor);
register$1(editor);