TinyMCE: Update to 4.9.2

https://github.com/tinymce/tinymce-dist/compare/4.8.0...4.9.2

Fixes #46094.


Built from https://develop.svn.wordpress.org/trunk@44713


git-svn-id: http://core.svn.wordpress.org/trunk@44544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ella Iseulde Van Dorpe 2019-01-29 20:19:51 +00:00
parent da75c0cdb6
commit 2ce767141a
25 changed files with 27782 additions and 27188 deletions

View File

@ -7,13 +7,13 @@ var charmap = (function () {
var fireInsertCustomChar = function (editor, chr) { var fireInsertCustomChar = function (editor, chr) {
return editor.fire('insertCustomChar', { chr: chr }); return editor.fire('insertCustomChar', { chr: chr });
}; };
var $_ce2ncy9qjjgwebhk = { fireInsertCustomChar: fireInsertCustomChar }; var Events = { fireInsertCustomChar: fireInsertCustomChar };
var insertChar = function (editor, chr) { var insertChar = function (editor, chr) {
var evtChr = $_ce2ncy9qjjgwebhk.fireInsertCustomChar(editor, chr).chr; var evtChr = Events.fireInsertCustomChar(editor, chr).chr;
editor.execCommand('mceInsertContent', false, evtChr); editor.execCommand('mceInsertContent', false, evtChr);
}; };
var $_el68bd9pjjgwebhj = { insertChar: insertChar }; var Actions = { insertChar: insertChar };
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
@ -23,7 +23,7 @@ var charmap = (function () {
var getCharMapAppend = function (editor) { var getCharMapAppend = function (editor) {
return editor.settings.charmap_append; return editor.settings.charmap_append;
}; };
var $_5e4nos9tjjgwebhr = { var Settings = {
getCharMap: getCharMap, getCharMap: getCharMap,
getCharMapAppend: getCharMapAppend getCharMapAppend: getCharMapAppend
}; };
@ -1096,11 +1096,11 @@ var charmap = (function () {
return []; return [];
}; };
var extendCharMap = function (editor, charmap) { var extendCharMap = function (editor, charmap) {
var userCharMap = $_5e4nos9tjjgwebhr.getCharMap(editor); var userCharMap = Settings.getCharMap(editor);
if (userCharMap) { if (userCharMap) {
charmap = getCharsFromSetting(userCharMap); charmap = getCharsFromSetting(userCharMap);
} }
var userCharMapAppend = $_5e4nos9tjjgwebhr.getCharMapAppend(editor); var userCharMapAppend = Settings.getCharMapAppend(editor);
if (userCharMapAppend) { if (userCharMapAppend) {
return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend)); return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend));
} }
@ -1109,21 +1109,21 @@ var charmap = (function () {
var getCharMap$1 = function (editor) { var getCharMap$1 = function (editor) {
return extendCharMap(editor, getDefaultCharMap()); return extendCharMap(editor, getDefaultCharMap());
}; };
var $_dc8shd9rjjgwebhl = { getCharMap: getCharMap$1 }; var CharMap = { getCharMap: getCharMap$1 };
var get = function (editor) { var get = function (editor) {
var getCharMap = function () { var getCharMap = function () {
return $_dc8shd9rjjgwebhl.getCharMap(editor); return CharMap.getCharMap(editor);
}; };
var insertChar = function (chr) { var insertChar = function (chr) {
$_el68bd9pjjgwebhj.insertChar(editor, chr); Actions.insertChar(editor, chr);
}; };
return { return {
getCharMap: getCharMap, getCharMap: getCharMap,
insertChar: insertChar insertChar: insertChar
}; };
}; };
var $_gbufu29ojjgwebhf = { get: get }; var Api = { get: get };
var getHtml = function (charmap) { var getHtml = function (charmap) {
var gridHtml, x, y; var gridHtml, x, y;
@ -1148,7 +1148,7 @@ var charmap = (function () {
gridHtml += '</tbody></table>'; gridHtml += '</tbody></table>';
return gridHtml; return gridHtml;
}; };
var $_6avwgq9wjjgwebi2 = { getHtml: getHtml }; var GridHtml = { getHtml: getHtml };
var getParentTd = function (elm) { var getParentTd = function (elm) {
while (elm) { while (elm) {
@ -1162,7 +1162,7 @@ var charmap = (function () {
var win; var win;
var charMapPanel = { var charMapPanel = {
type: 'container', type: 'container',
html: $_6avwgq9wjjgwebi2.getHtml($_dc8shd9rjjgwebhl.getCharMap(editor)), html: GridHtml.getHtml(CharMap.getCharMap(editor)),
onclick: function (e) { onclick: function (e) {
var target = e.target; var target = e.target;
if (/^(TD|DIV)$/.test(target.nodeName)) { if (/^(TD|DIV)$/.test(target.nodeName)) {
@ -1171,7 +1171,7 @@ var charmap = (function () {
var charCodeString = charDiv.getAttribute('data-chr'); var charCodeString = charDiv.getAttribute('data-chr');
var charCode = parseInt(charCodeString, 10); var charCode = parseInt(charCodeString, 10);
if (!isNaN(charCode)) { if (!isNaN(charCode)) {
$_el68bd9pjjgwebhj.insertChar(editor, String.fromCharCode(charCode)); Actions.insertChar(editor, String.fromCharCode(charCode));
} }
if (!e.ctrlKey) { if (!e.ctrlKey) {
win.close(); win.close();
@ -1237,14 +1237,14 @@ var charmap = (function () {
}] }]
}); });
}; };
var $_3eaa3c9vjjgwebht = { open: open }; var Dialog = { open: open };
var register = function (editor) { var register = function (editor) {
editor.addCommand('mceShowCharmap', function () { editor.addCommand('mceShowCharmap', function () {
$_3eaa3c9vjjgwebht.open(editor); Dialog.open(editor);
}); });
}; };
var $_b5cdu19ujjgwebhs = { register: register }; var Commands = { register: register };
var register$1 = function (editor) { var register$1 = function (editor) {
editor.addButton('charmap', { editor.addButton('charmap', {
@ -1259,12 +1259,12 @@ var charmap = (function () {
context: 'insert' context: 'insert'
}); });
}; };
var $_19iu2m9xjjgwebi3 = { register: register$1 }; var Buttons = { register: register$1 };
global.add('charmap', function (editor) { global.add('charmap', function (editor) {
$_b5cdu19ujjgwebhs.register(editor); Commands.register(editor);
$_19iu2m9xjjgwebi3.register(editor); Buttons.register(editor);
return $_gbufu29ojjgwebhf.get(editor); return Api.get(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -108,12 +108,12 @@ var colorpicker = (function () {
}); });
setColor(win, value); setColor(win, value);
}; };
var $_2gqaphanjjgwebmu = { open: open }; var Dialog = { open: open };
global.add('colorpicker', function (editor) { global.add('colorpicker', function (editor) {
if (!editor.settings.color_picker_callback) { if (!editor.settings.color_picker_callback) {
editor.settings.color_picker_callback = function (callback, value) { editor.settings.color_picker_callback = function (callback, value) {
$_2gqaphanjjgwebmu.open(editor, callback, value); Dialog.open(editor, callback, value);
}; };
} }
}); });

View File

@ -20,17 +20,17 @@ var directionality = (function () {
editor.nodeChanged(); editor.nodeChanged();
} }
}; };
var $_fd54yfb4jjgwebo5 = { setDir: setDir }; var Direction = { setDir: setDir };
var register = function (editor) { var register = function (editor) {
editor.addCommand('mceDirectionLTR', function () { editor.addCommand('mceDirectionLTR', function () {
$_fd54yfb4jjgwebo5.setDir(editor, 'ltr'); Direction.setDir(editor, 'ltr');
}); });
editor.addCommand('mceDirectionRTL', function () { editor.addCommand('mceDirectionRTL', function () {
$_fd54yfb4jjgwebo5.setDir(editor, 'rtl'); Direction.setDir(editor, 'rtl');
}); });
}; };
var $_cpb3fob3jjgwebo4 = { register: register }; var Commands = { register: register };
var generateSelector = function (dir) { var generateSelector = function (dir) {
var selector = []; var selector = [];
@ -51,11 +51,11 @@ var directionality = (function () {
stateSelector: generateSelector('rtl') stateSelector: generateSelector('rtl')
}); });
}; };
var $_8ch9fzb6jjgwebo7 = { register: register$1 }; var Buttons = { register: register$1 };
global.add('directionality', function (editor) { global.add('directionality', function (editor) {
$_cpb3fob3jjgwebo4.register(editor); Commands.register(editor);
$_8ch9fzb6jjgwebo7.register(editor); Buttons.register(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -29,14 +29,14 @@ var fullscreen = (function () {
} }
}; };
}; };
var $_6qfcwucejjgwebu0 = { get: get }; var Api = { get: get };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var fireFullscreenStateChanged = function (editor, state) { var fireFullscreenStateChanged = function (editor, state) {
editor.fire('FullscreenStateChanged', { state: state }); editor.fire('FullscreenStateChanged', { state: state });
}; };
var $_en5ltwcijjgwebu6 = { fireFullscreenStateChanged: fireFullscreenStateChanged }; var Events = { fireFullscreenStateChanged: fireFullscreenStateChanged };
var DOM = global$1.DOM; var DOM = global$1.DOM;
var getWindowSize = function () { var getWindowSize = function () {
@ -103,7 +103,7 @@ var fullscreen = (function () {
editor.on('remove', removeResize); editor.on('remove', removeResize);
resize(); resize();
fullscreenState.set(newFullScreenInfo); fullscreenState.set(newFullScreenInfo);
$_en5ltwcijjgwebu6.fireFullscreenStateChanged(editor, true); Events.fireFullscreenStateChanged(editor, true);
} else { } else {
iframeStyle.width = fullscreenInfo.iframeWidth; iframeStyle.width = fullscreenInfo.iframeWidth;
iframeStyle.height = fullscreenInfo.iframeHeight; iframeStyle.height = fullscreenInfo.iframeHeight;
@ -120,17 +120,17 @@ var fullscreen = (function () {
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler); DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler); editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null); fullscreenState.set(null);
$_en5ltwcijjgwebu6.fireFullscreenStateChanged(editor, false); Events.fireFullscreenStateChanged(editor, false);
} }
}; };
var $_dvg07kcgjjgwebu3 = { toggleFullscreen: toggleFullscreen }; var Actions = { toggleFullscreen: toggleFullscreen };
var register = function (editor, fullscreenState) { var register = function (editor, fullscreenState) {
editor.addCommand('mceFullScreen', function () { editor.addCommand('mceFullScreen', function () {
$_dvg07kcgjjgwebu3.toggleFullscreen(editor, fullscreenState); Actions.toggleFullscreen(editor, fullscreenState);
}); });
}; };
var $_bebdcrcfjjgwebu1 = { register: register }; var Commands = { register: register };
var postRender = function (editor) { var postRender = function (editor) {
return function (e) { return function (e) {
@ -156,17 +156,17 @@ var fullscreen = (function () {
onPostRender: postRender(editor) onPostRender: postRender(editor)
}); });
}; };
var $_tne4sckjjgwebuo = { register: register$1 }; var Buttons = { register: register$1 };
global.add('fullscreen', function (editor) { global.add('fullscreen', function (editor) {
var fullscreenState = Cell(null); var fullscreenState = Cell(null);
if (editor.settings.inline) { if (editor.settings.inline) {
return $_6qfcwucejjgwebu0.get(fullscreenState); return Api.get(fullscreenState);
} }
$_bebdcrcfjjgwebu1.register(editor, fullscreenState); Commands.register(editor, fullscreenState);
$_tne4sckjjgwebuo.register(editor); Buttons.register(editor);
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen'); editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
return $_6qfcwucejjgwebu0.get(fullscreenState); return Api.get(fullscreenState);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -9,7 +9,7 @@ var hr = (function () {
editor.execCommand('mceInsertContent', false, '<hr />'); editor.execCommand('mceInsertContent', false, '<hr />');
}); });
}; };
var $_cqh592cnjjgwebvk = { register: register }; var Commands = { register: register };
var register$1 = function (editor) { var register$1 = function (editor) {
editor.addButton('hr', { editor.addButton('hr', {
@ -24,11 +24,11 @@ var hr = (function () {
context: 'insert' context: 'insert'
}); });
}; };
var $_13g834cojjgwebvl = { register: register$1 }; var Buttons = { register: register$1 };
global.add('hr', function (editor) { global.add('hr', function (editor) {
$_cqh592cnjjgwebvk.register(editor); Commands.register(editor);
$_13g834cojjgwebvl.register(editor); Buttons.register(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -46,7 +46,7 @@ var image = (function () {
var getUploadCredentials = function (editor) { var getUploadCredentials = function (editor) {
return editor.getParam('images_upload_credentials'); return editor.getParam('images_upload_credentials');
}; };
var $_1dn8wtctjjgwebvz = { var Settings = {
hasDimensions: hasDimensions, hasDimensions: hasDimensions,
hasAdvTab: hasAdvTab, hasAdvTab: hasAdvTab,
getPrependUrl: getPrependUrl, getPrependUrl: getPrependUrl,
@ -85,10 +85,10 @@ var image = (function () {
throw name + ' not available on this browser'; throw name + ' not available on this browser';
return actual; return actual;
}; };
var $_oab1bcwjjgwebwl = { getOrDie: getOrDie }; var Global$1 = { getOrDie: getOrDie };
function FileReader () { function FileReader () {
var f = $_oab1bcwjjgwebwl.getOrDie('FileReader'); var f = Global$1.getOrDie('FileReader');
return new f(); return new f();
} }
@ -190,7 +190,7 @@ var image = (function () {
return css; return css;
}; };
var createImageList = function (editor, callback) { var createImageList = function (editor, callback) {
var imageList = $_1dn8wtctjjgwebvz.getImageList(editor); var imageList = Settings.getImageList(editor);
if (typeof imageList === 'string') { if (typeof imageList === 'string') {
global$3.send({ global$3.send({
url: imageList, url: imageList,
@ -213,7 +213,7 @@ var image = (function () {
} }
} }
imgElm.onload = function () { imgElm.onload = function () {
if (!data.width && !data.height && $_1dn8wtctjjgwebvz.hasDimensions(editor)) { if (!data.width && !data.height && Settings.hasDimensions(editor)) {
editor.dom.setAttribs(imgElm, { editor.dom.setAttribs(imgElm, {
width: imgElm.clientWidth, width: imgElm.clientWidth,
height: imgElm.clientHeight height: imgElm.clientHeight
@ -225,17 +225,17 @@ var image = (function () {
}; };
var blobToDataUri = function (blob) { var blobToDataUri = function (blob) {
return new global$1(function (resolve, reject) { return new global$1(function (resolve, reject) {
var reader = new FileReader(); var reader = FileReader();
reader.onload = function () { reader.onload = function () {
resolve(reader.result); resolve(reader.result);
}; };
reader.onerror = function () { reader.onerror = function () {
reject(FileReader.error.message); reject(reader.error.message);
}; };
reader.readAsDataURL(blob); reader.readAsDataURL(blob);
}); });
}; };
var $_1e8k4ncujjgwebw2 = { var Utils = {
getImageSize: getImageSize, getImageSize: getImageSize,
buildListItems: buildListItems, buildListItems: buildListItems,
removePixelSuffix: removePixelSuffix, removePixelSuffix: removePixelSuffix,
@ -270,27 +270,26 @@ var image = (function () {
return ret; return ret;
}; };
}; };
var merge = baseMerge(shallow); var merge = baseMerge(shallow);
var DOM = global$4.DOM; var DOM = global$4.DOM;
var getHspace = function (image) { var getHspace = function (image) {
if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) { if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style.marginLeft); return Utils.removePixelSuffix(image.style.marginLeft);
} else { } else {
return ''; return '';
} }
}; };
var getVspace = function (image) { var getVspace = function (image) {
if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) { if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) {
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style.marginTop); return Utils.removePixelSuffix(image.style.marginTop);
} else { } else {
return ''; return '';
} }
}; };
var getBorder = function (image) { var getBorder = function (image) {
if (image.style.borderWidth) { if (image.style.borderWidth) {
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style.borderWidth); return Utils.removePixelSuffix(image.style.borderWidth);
} else { } else {
return ''; return '';
} }
@ -343,7 +342,7 @@ var image = (function () {
var setSize = function (name$$1, normalizeCss) { var setSize = function (name$$1, normalizeCss) {
return function (image, name$$1, value) { return function (image, name$$1, value) {
if (image.style[name$$1]) { if (image.style[name$$1]) {
image.style[name$$1] = $_1e8k4ncujjgwebw2.addPixelSuffix(value); image.style[name$$1] = Utils.addPixelSuffix(value);
normalizeStyle(image, normalizeCss); normalizeStyle(image, normalizeCss);
} else { } else {
setAttrib(image, name$$1, value); setAttrib(image, name$$1, value);
@ -352,23 +351,23 @@ var image = (function () {
}; };
var getSize = function (image, name$$1) { var getSize = function (image, name$$1) {
if (image.style[name$$1]) { if (image.style[name$$1]) {
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style[name$$1]); return Utils.removePixelSuffix(image.style[name$$1]);
} else { } else {
return getAttrib(image, name$$1); return getAttrib(image, name$$1);
} }
}; };
var setHspace = function (image, value) { var setHspace = function (image, value) {
var pxValue = $_1e8k4ncujjgwebw2.addPixelSuffix(value); var pxValue = Utils.addPixelSuffix(value);
image.style.marginLeft = pxValue; image.style.marginLeft = pxValue;
image.style.marginRight = pxValue; image.style.marginRight = pxValue;
}; };
var setVspace = function (image, value) { var setVspace = function (image, value) {
var pxValue = $_1e8k4ncujjgwebw2.addPixelSuffix(value); var pxValue = Utils.addPixelSuffix(value);
image.style.marginTop = pxValue; image.style.marginTop = pxValue;
image.style.marginBottom = pxValue; image.style.marginBottom = pxValue;
}; };
var setBorder = function (image, value) { var setBorder = function (image, value) {
var pxValue = $_1e8k4ncujjgwebw2.addPixelSuffix(value); var pxValue = Utils.addPixelSuffix(value);
image.style.borderWidth = pxValue; image.style.borderWidth = pxValue;
}; };
var setBorderStyle = function (image, value) { var setBorderStyle = function (image, value) {
@ -476,7 +475,7 @@ var image = (function () {
var normalizeCss = function (editor, cssText) { var normalizeCss = function (editor, cssText) {
var css = editor.dom.styles.parse(cssText); var css = editor.dom.styles.parse(cssText);
var mergedCss = $_1e8k4ncujjgwebw2.mergeMargins(css); var mergedCss = Utils.mergeMargins(css);
var compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss)); var compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));
return editor.dom.styles.serialize(compressed); return editor.dom.styles.serialize(compressed);
}; };
@ -495,7 +494,7 @@ var image = (function () {
var dom = editor.dom; var dom = editor.dom;
var textBlock = dom.getParent(figure.parentNode, function (node) { var textBlock = dom.getParent(figure.parentNode, function (node) {
return editor.schema.getTextBlockElements()[node.nodeName]; return editor.schema.getTextBlockElements()[node.nodeName];
}); }, editor.getBody());
if (textBlock) { if (textBlock) {
return dom.split(textBlock, figure); return dom.split(textBlock, figure);
} else { } else {
@ -551,7 +550,7 @@ var image = (function () {
editor.selection.select(image.parentNode); editor.selection.select(image.parentNode);
} else { } else {
editor.selection.select(image); editor.selection.select(image);
$_1e8k4ncujjgwebw2.waitLoadImage(editor, data, image); Utils.waitLoadImage(editor, data, image);
} }
}; };
var insertOrUpdateImage = function (editor, data) { var insertOrUpdateImage = function (editor, data) {
@ -571,28 +570,28 @@ var image = (function () {
return function (evt) { return function (evt) {
var dom = editor.dom; var dom = editor.dom;
var rootControl = evt.control.rootControl; var rootControl = evt.control.rootControl;
if (!$_1dn8wtctjjgwebvz.hasAdvTab(editor)) { if (!Settings.hasAdvTab(editor)) {
return; return;
} }
var data = rootControl.toJSON(); var data = rootControl.toJSON();
var css = dom.parseStyle(data.style); var css = dom.parseStyle(data.style);
rootControl.find('#vspace').value(''); rootControl.find('#vspace').value('');
rootControl.find('#hspace').value(''); rootControl.find('#hspace').value('');
css = $_1e8k4ncujjgwebw2.mergeMargins(css); css = Utils.mergeMargins(css);
if (css['margin-top'] && css['margin-bottom'] || css['margin-right'] && css['margin-left']) { if (css['margin-top'] && css['margin-bottom'] || css['margin-right'] && css['margin-left']) {
if (css['margin-top'] === css['margin-bottom']) { if (css['margin-top'] === css['margin-bottom']) {
rootControl.find('#vspace').value($_1e8k4ncujjgwebw2.removePixelSuffix(css['margin-top'])); rootControl.find('#vspace').value(Utils.removePixelSuffix(css['margin-top']));
} else { } else {
rootControl.find('#vspace').value(''); rootControl.find('#vspace').value('');
} }
if (css['margin-right'] === css['margin-left']) { if (css['margin-right'] === css['margin-left']) {
rootControl.find('#hspace').value($_1e8k4ncujjgwebw2.removePixelSuffix(css['margin-right'])); rootControl.find('#hspace').value(Utils.removePixelSuffix(css['margin-right']));
} else { } else {
rootControl.find('#hspace').value(''); rootControl.find('#hspace').value('');
} }
} }
if (css['border-width']) { if (css['border-width']) {
rootControl.find('#border').value($_1e8k4ncujjgwebw2.removePixelSuffix(css['border-width'])); rootControl.find('#border').value(Utils.removePixelSuffix(css['border-width']));
} else { } else {
rootControl.find('#border').value(''); rootControl.find('#border').value('');
} }
@ -711,7 +710,7 @@ var image = (function () {
] ]
}; };
}; };
var $_6dfy5vd3jjgwebxf = { makeTab: makeTab }; var AdvTab = { makeTab: makeTab };
var doSyncSize = function (widthCtrl, heightCtrl) { var doSyncSize = function (widthCtrl, heightCtrl) {
widthCtrl.state.set('oldVal', widthCtrl.value()); widthCtrl.state.set('oldVal', widthCtrl.value());
@ -791,7 +790,7 @@ var image = (function () {
] ]
}; };
}; };
var $_ftlz5pdajjgweby4 = { var SizeManager = {
createUi: createUi, createUi: createUi,
syncSize: syncSize, syncSize: syncSize,
updateSize: updateSize updateSize: updateSize
@ -811,17 +810,17 @@ var image = (function () {
}); });
if (!meta.width && !meta.height) { if (!meta.width && !meta.height) {
srcURL = editor.convertURL(control.value(), 'src'); srcURL = editor.convertURL(control.value(), 'src');
prependURL = $_1dn8wtctjjgwebvz.getPrependUrl(editor); prependURL = Settings.getPrependUrl(editor);
absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i'); absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i');
if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) { if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) {
srcURL = prependURL + srcURL; srcURL = prependURL + srcURL;
} }
control.value(srcURL); control.value(srcURL);
$_1e8k4ncujjgwebw2.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) { Utils.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) {
if (data.width && data.height && $_1dn8wtctjjgwebvz.hasDimensions(editor)) { if (data.width && data.height && Settings.hasDimensions(editor)) {
rootControl.find('#width').value(data.width); rootControl.find('#width').value(data.width);
rootControl.find('#height').value(data.height); rootControl.find('#height').value(data.height);
$_ftlz5pdajjgweby4.syncSize(rootControl); SizeManager.syncSize(rootControl);
} }
}); });
} }
@ -844,29 +843,29 @@ var image = (function () {
}, },
imageListCtrl imageListCtrl
]; ];
if ($_1dn8wtctjjgwebvz.hasDescription(editor)) { if (Settings.hasDescription(editor)) {
generalFormItems.push({ generalFormItems.push({
name: 'alt', name: 'alt',
type: 'textbox', type: 'textbox',
label: 'Image description' label: 'Image description'
}); });
} }
if ($_1dn8wtctjjgwebvz.hasImageTitle(editor)) { if (Settings.hasImageTitle(editor)) {
generalFormItems.push({ generalFormItems.push({
name: 'title', name: 'title',
type: 'textbox', type: 'textbox',
label: 'Image Title' label: 'Image Title'
}); });
} }
if ($_1dn8wtctjjgwebvz.hasDimensions(editor)) { if (Settings.hasDimensions(editor)) {
generalFormItems.push($_ftlz5pdajjgweby4.createUi()); generalFormItems.push(SizeManager.createUi());
} }
if ($_1dn8wtctjjgwebvz.getClassList(editor)) { if (Settings.getClassList(editor)) {
generalFormItems.push({ generalFormItems.push({
name: 'class', name: 'class',
type: 'listbox', type: 'listbox',
label: 'Class', label: 'Class',
values: $_1e8k4ncujjgwebw2.buildListItems($_1dn8wtctjjgwebvz.getClassList(editor), function (item) { values: Utils.buildListItems(Settings.getClassList(editor), function (item) {
if (item.value) { if (item.value) {
item.textStyle = function () { item.textStyle = function () {
return editor.formatter.getCssText({ return editor.formatter.getCssText({
@ -878,7 +877,7 @@ var image = (function () {
}) })
}); });
} }
if ($_1dn8wtctjjgwebvz.hasImageCaption(editor)) { if (Settings.hasImageCaption(editor)) {
generalFormItems.push({ generalFormItems.push({
name: 'caption', name: 'caption',
type: 'checkbox', type: 'checkbox',
@ -894,13 +893,13 @@ var image = (function () {
items: getGeneralItems(editor, imageListCtrl) items: getGeneralItems(editor, imageListCtrl)
}; };
}; };
var $_78zck5d9jjgweby1 = { var MainTab = {
makeTab: makeTab$1, makeTab: makeTab$1,
getGeneralItems: getGeneralItems getGeneralItems: getGeneralItems
}; };
var url = function () { var url = function () {
return $_oab1bcwjjgwebwl.getOrDie('URL'); return Global$1.getOrDie('URL');
}; };
var createObjectURL = function (blob) { var createObjectURL = function (blob) {
return url().createObjectURL(blob); return url().createObjectURL(blob);
@ -908,7 +907,7 @@ var image = (function () {
var revokeObjectURL = function (u) { var revokeObjectURL = function (u) {
url().revokeObjectURL(u); url().revokeObjectURL(u);
}; };
var $_86i13edcjjgwebya = { var URL = {
createObjectURL: createObjectURL, createObjectURL: createObjectURL,
revokeObjectURL: revokeObjectURL revokeObjectURL: revokeObjectURL
}; };
@ -916,7 +915,7 @@ var image = (function () {
var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory'); var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
function XMLHttpRequest () { function XMLHttpRequest () {
var f = $_oab1bcwjjgwebwl.getOrDie('XMLHttpRequest'); var f = Global$1.getOrDie('XMLHttpRequest');
return new f(); return new f();
} }
@ -931,7 +930,7 @@ var image = (function () {
function Uploader (settings) { function Uploader (settings) {
var defaultHandler = function (blobInfo, success, failure, progress) { var defaultHandler = function (blobInfo, success, failure, progress) {
var xhr, formData; var xhr, formData;
xhr = new XMLHttpRequest(); xhr = XMLHttpRequest();
xhr.open('POST', settings.url); xhr.open('POST', settings.url);
xhr.withCredentials = settings.credentials; xhr.withCredentials = settings.credentials;
xhr.upload.onprogress = function (e) { xhr.upload.onprogress = function (e) {
@ -985,19 +984,19 @@ var image = (function () {
var rootControl = evt.control.rootControl; var rootControl = evt.control.rootControl;
var throbber = new Throbber(rootControl.getEl()); var throbber = new Throbber(rootControl.getEl());
var file = evt.control.value(); var file = evt.control.value();
var blobUri = $_86i13edcjjgwebya.createObjectURL(file); var blobUri = URL.createObjectURL(file);
var uploader = Uploader({ var uploader = Uploader({
url: $_1dn8wtctjjgwebvz.getUploadUrl(editor), url: Settings.getUploadUrl(editor),
basePath: $_1dn8wtctjjgwebvz.getUploadBasePath(editor), basePath: Settings.getUploadBasePath(editor),
credentials: $_1dn8wtctjjgwebvz.getUploadCredentials(editor), credentials: Settings.getUploadCredentials(editor),
handler: $_1dn8wtctjjgwebvz.getUploadHandler(editor) handler: Settings.getUploadHandler(editor)
}); });
var finalize = function () { var finalize = function () {
throbber.hide(); throbber.hide();
$_86i13edcjjgwebya.revokeObjectURL(blobUri); URL.revokeObjectURL(blobUri);
}; };
throbber.show(); throbber.show();
return $_1e8k4ncujjgwebw2.blobToDataUri(file).then(function (dataUrl) { return Utils.blobToDataUri(file).then(function (dataUrl) {
var blobInfo = editor.editorUpload.blobCache.create({ var blobInfo = editor.editorUpload.blobCache.create({
blob: file, blob: file,
blobUri: blobUri, blobUri: blobUri,
@ -1057,32 +1056,26 @@ var image = (function () {
] ]
}; };
}; };
var $_71qd7mdbjjgweby7 = { makeTab: makeTab$2 }; var UploadTab = { makeTab: makeTab$2 };
var curry = function (f) { function curry(fn) {
var x = []; var initialArgs = [];
for (var _i = 1; _i < arguments.length; _i++) { for (var _i = 1; _i < arguments.length; _i++) {
x[_i - 1] = arguments[_i]; initialArgs[_i - 1] = arguments[_i];
} }
var args = new Array(arguments.length - 1);
for (var i = 1; i < arguments.length; i++)
args[i - 1] = arguments[i];
return function () { return function () {
var x = []; var restArgs = [];
for (var _i = 0; _i < arguments.length; _i++) { for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i]; restArgs[_i] = arguments[_i];
} }
var newArgs = new Array(arguments.length); var all = initialArgs.concat(restArgs);
for (var j = 0; j < newArgs.length; j++) return fn.apply(null, all);
newArgs[j] = arguments[j];
var all = args.concat(newArgs);
return f.apply(null, all);
};
}; };
}
var submitForm = function (editor, evt) { var submitForm = function (editor, evt) {
var win = evt.control.getRoot(); var win = evt.control.getRoot();
$_ftlz5pdajjgweby4.updateSize(win); SizeManager.updateSize(win);
editor.undoManager.transact(function () { editor.undoManager.transact(function () {
var data = merge(readImageDataFromSelection(editor), win.toJSON()); var data = merge(readImageDataFromSelection(editor), win.toJSON());
insertOrUpdateImage(editor, data); insertOrUpdateImage(editor, data);
@ -1098,7 +1091,7 @@ var image = (function () {
type: 'listbox', type: 'listbox',
label: 'Image list', label: 'Image list',
name: 'image-list', name: 'image-list',
values: $_1e8k4ncujjgwebw2.buildListItems(imageList, function (item) { values: Utils.buildListItems(imageList, function (item) {
item.value = editor.convertURL(item.value || item.url, 'src'); item.value = editor.convertURL(item.value || item.url, 'src');
}, [{ }, [{
text: 'None', text: 'None',
@ -1117,13 +1110,13 @@ var image = (function () {
} }
}; };
} }
if ($_1dn8wtctjjgwebvz.hasAdvTab(editor) || $_1dn8wtctjjgwebvz.hasUploadUrl(editor) || $_1dn8wtctjjgwebvz.hasUploadHandler(editor)) { if (Settings.hasAdvTab(editor) || Settings.hasUploadUrl(editor) || Settings.hasUploadHandler(editor)) {
var body = [$_78zck5d9jjgweby1.makeTab(editor, imageListCtrl)]; var body = [MainTab.makeTab(editor, imageListCtrl)];
if ($_1dn8wtctjjgwebvz.hasAdvTab(editor)) { if (Settings.hasAdvTab(editor)) {
body.push($_6dfy5vd3jjgwebxf.makeTab(editor)); body.push(AdvTab.makeTab(editor));
} }
if ($_1dn8wtctjjgwebvz.hasUploadUrl(editor) || $_1dn8wtctjjgwebvz.hasUploadHandler(editor)) { if (Settings.hasUploadUrl(editor) || Settings.hasUploadHandler(editor)) {
body.push($_71qd7mdbjjgweby7.makeTab(editor)); body.push(UploadTab.makeTab(editor));
} }
win = editor.windowManager.open({ win = editor.windowManager.open({
title: 'Insert/edit image', title: 'Insert/edit image',
@ -1136,14 +1129,14 @@ var image = (function () {
win = editor.windowManager.open({ win = editor.windowManager.open({
title: 'Insert/edit image', title: 'Insert/edit image',
data: data, data: data,
body: $_78zck5d9jjgweby1.getGeneralItems(editor, imageListCtrl), body: MainTab.getGeneralItems(editor, imageListCtrl),
onSubmit: curry(submitForm, editor) onSubmit: curry(submitForm, editor)
}); });
} }
$_ftlz5pdajjgweby4.syncSize(win); SizeManager.syncSize(win);
} }
function open() { function open() {
$_1e8k4ncujjgwebw2.createImageList(editor, showDialog); Utils.createImageList(editor, showDialog);
} }
return { open: open }; return { open: open };
} }
@ -1151,7 +1144,7 @@ var image = (function () {
var register = function (editor) { var register = function (editor) {
editor.addCommand('mceImage', Dialog(editor).open); editor.addCommand('mceImage', Dialog(editor).open);
}; };
var $_3lypdlcrjjgwebvs = { register: register }; var Commands = { register: register };
var hasImageClass = function (node) { var hasImageClass = function (node) {
var className = node.attr('class'); var className = node.attr('class');
@ -1178,7 +1171,7 @@ var image = (function () {
editor.serializer.addNodeFilter('figure', toggleContentEditableState(false)); editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
}); });
}; };
var $_5op6l2dhjjgwebym = { setup: setup }; var FilterContent = { setup: setup };
var register$1 = function (editor) { var register$1 = function (editor) {
editor.addButton('image', { editor.addButton('image', {
@ -1195,12 +1188,12 @@ var image = (function () {
prependToContext: true prependToContext: true
}); });
}; };
var $_dm869adijjgwebyn = { register: register$1 }; var Buttons = { register: register$1 };
global.add('image', function (editor) { global.add('image', function (editor) {
$_5op6l2dhjjgwebym.setup(editor); FilterContent.setup(editor);
$_dm869adijjgwebyn.register(editor); Buttons.register(editor);
$_3lypdlcrjjgwebvs.register(editor); Commands.register(editor);
}); });
function Plugin () { function Plugin () {
} }

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@ var link = (function () {
var allowUnsafeLinkTarget = function (editorSettings) { var allowUnsafeLinkTarget = function (editorSettings) {
return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false; return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
}; };
var $_1b4wbxfvjjgwechi = { var Settings = {
assumeExternalTargets: assumeExternalTargets, assumeExternalTargets: assumeExternalTargets,
hasContextToolbar: hasContextToolbar, hasContextToolbar: hasContextToolbar,
getLinkList: getLinkList, getLinkList: getLinkList,
@ -94,7 +94,7 @@ var link = (function () {
} }
} }
}; };
var $_du0gebfwjjgwechl = { open: open$$1 }; var OpenUrl = { open: open$$1 };
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
@ -158,7 +158,7 @@ var link = (function () {
class: data.class ? data.class : null, class: data.class ? data.class : null,
title: data.title ? data.title : null title: data.title ? data.title : null
}; };
if (!$_1b4wbxfvjjgwechi.hasRelList(editor.settings) && $_1b4wbxfvjjgwechi.allowUnsafeLinkTarget(editor.settings) === false) { if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank'); linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
} }
if (data.href === attachState.href) { if (data.href === attachState.href) {
@ -221,7 +221,7 @@ var link = (function () {
a.appendChild(img); a.appendChild(img);
} }
}; };
var $_5298ug0jjgweci0 = { var Utils = {
link: link, link: link,
unlink: unlink, unlink: unlink,
isLink: isLink, isLink: isLink,
@ -238,7 +238,7 @@ var link = (function () {
var attachState = {}; var attachState = {};
var createLinkList = function (editor, callback) { var createLinkList = function (editor, callback) {
var linkList = $_1b4wbxfvjjgwechi.getLinkList(editor.settings); var linkList = Settings.getLinkList(editor.settings);
if (typeof linkList === 'string') { if (typeof linkList === 'string') {
global$6.send({ global$6.send({
url: linkList, url: linkList,
@ -355,14 +355,14 @@ var link = (function () {
var onBeforeCall = function (e) { var onBeforeCall = function (e) {
e.meta = win.toJSON(); e.meta = win.toJSON();
}; };
onlyText = $_5298ug0jjgweci0.isOnlyTextSelected(selection.getContent()); onlyText = Utils.isOnlyTextSelected(selection.getContent());
anchorElm = $_5298ug0jjgweci0.getAnchorElement(editor); anchorElm = Utils.getAnchorElement(editor);
data.text = initialText = $_5298ug0jjgweci0.getAnchorText(editor.selection, anchorElm); data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : ''; data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
if (anchorElm) { if (anchorElm) {
data.target = dom.getAttrib(anchorElm, 'target'); data.target = dom.getAttrib(anchorElm, 'target');
} else if ($_1b4wbxfvjjgwechi.hasDefaultLinkTarget(editor.settings)) { } else if (Settings.hasDefaultLinkTarget(editor.settings)) {
data.target = $_1b4wbxfvjjgwechi.getDefaultLinkTarget(editor.settings); data.target = Settings.getDefaultLinkTarget(editor.settings);
} }
if (value = dom.getAttrib(anchorElm, 'rel')) { if (value = dom.getAttrib(anchorElm, 'rel')) {
data.rel = value; data.rel = value;
@ -401,9 +401,9 @@ var link = (function () {
} }
}; };
} }
if ($_1b4wbxfvjjgwechi.shouldShowTargetList(editor.settings)) { if (Settings.shouldShowTargetList(editor.settings)) {
if ($_1b4wbxfvjjgwechi.getTargetList(editor.settings) === undefined) { if (Settings.getTargetList(editor.settings) === undefined) {
$_1b4wbxfvjjgwechi.setTargetList(editor, [ Settings.setTargetList(editor, [
{ {
text: 'None', text: 'None',
value: '' value: ''
@ -418,27 +418,27 @@ var link = (function () {
name: 'target', name: 'target',
type: 'listbox', type: 'listbox',
label: 'Target', label: 'Target',
values: buildListItems($_1b4wbxfvjjgwechi.getTargetList(editor.settings)) values: buildListItems(Settings.getTargetList(editor.settings))
}; };
} }
if ($_1b4wbxfvjjgwechi.hasRelList(editor.settings)) { if (Settings.hasRelList(editor.settings)) {
relListCtrl = { relListCtrl = {
name: 'rel', name: 'rel',
type: 'listbox', type: 'listbox',
label: 'Rel', label: 'Rel',
values: buildListItems($_1b4wbxfvjjgwechi.getRelList(editor.settings), function (item) { values: buildListItems(Settings.getRelList(editor.settings), function (item) {
if ($_1b4wbxfvjjgwechi.allowUnsafeLinkTarget(editor.settings) === false) { if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
item.value = $_5298ug0jjgweci0.toggleTargetRules(item.value, data.target === '_blank'); item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
} }
}) })
}; };
} }
if ($_1b4wbxfvjjgwechi.hasLinkClassList(editor.settings)) { if (Settings.hasLinkClassList(editor.settings)) {
classListCtrl = { classListCtrl = {
name: 'class', name: 'class',
type: 'listbox', type: 'listbox',
label: 'Class', label: 'Class',
values: buildListItems($_1b4wbxfvjjgwechi.getLinkClassList(editor.settings), function (item) { values: buildListItems(Settings.getLinkClassList(editor.settings), function (item) {
if (item.value) { if (item.value) {
item.textStyle = function () { item.textStyle = function () {
return editor.formatter.getCssText({ return editor.formatter.getCssText({
@ -450,7 +450,7 @@ var link = (function () {
}) })
}; };
} }
if ($_1b4wbxfvjjgwechi.shouldShowLinkTitle(editor.settings)) { if (Settings.shouldShowLinkTitle(editor.settings)) {
linkTitleCtrl = { linkTitleCtrl = {
name: 'title', name: 'title',
type: 'textbox', type: 'textbox',
@ -483,9 +483,9 @@ var link = (function () {
classListCtrl classListCtrl
], ],
onSubmit: function (e) { onSubmit: function (e) {
var assumeExternalTargets = $_1b4wbxfvjjgwechi.assumeExternalTargets(editor.settings); var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
var insertLink = $_5298ug0jjgweci0.link(editor, attachState); var insertLink = Utils.link(editor, attachState);
var removeLink = $_5298ug0jjgweci0.unlink(editor); var removeLink = Utils.unlink(editor);
var resultData = global$4.extend({}, data, e.data); var resultData = global$4.extend({}, data, e.data);
var href = resultData.href; var href = resultData.href;
if (!href) { if (!href) {
@ -520,7 +520,7 @@ var link = (function () {
var open$1 = function (editor) { var open$1 = function (editor) {
createLinkList(editor, showDialog); createLinkList(editor, showDialog);
}; };
var $_dxaplrg2jjgweci6 = { open: open$1 }; var Dialog = { open: open$1 };
var getLink = function (editor, elm) { var getLink = function (editor, elm) {
return editor.dom.getParent(elm, 'a[href]'); return editor.dom.getParent(elm, 'a[href]');
@ -548,13 +548,13 @@ var link = (function () {
editor.selection.scrollIntoView(targetEl[0], true); editor.selection.scrollIntoView(targetEl[0], true);
} }
} else { } else {
$_du0gebfwjjgwechl.open(a.href); OpenUrl.open(a.href);
} }
} }
}; };
var openDialog = function (editor) { var openDialog = function (editor) {
return function () { return function () {
$_dxaplrg2jjgweci6.open(editor); Dialog.open(editor);
}; };
}; };
var gotoSelectedLink = function (editor) { var gotoSelectedLink = function (editor) {
@ -565,7 +565,7 @@ var link = (function () {
var leftClickedOnAHref = function (editor) { var leftClickedOnAHref = function (editor) {
return function (elm) { return function (elm) {
var sel, rng, node; var sel, rng, node;
if ($_1b4wbxfvjjgwechi.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_5298ug0jjgweci0.isLink(elm)) { if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
sel = editor.selection; sel = editor.selection;
rng = sel.getRng(); rng = sel.getRng();
node = rng.startContainer; node = rng.startContainer;
@ -596,7 +596,7 @@ var link = (function () {
return function () { return function () {
var self = this; var self = this;
editor.on('nodechange', function (e) { editor.on('nodechange', function (e) {
self.active(!editor.readonly && !!$_5298ug0jjgweci0.getAnchorElement(editor, e.element)); self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
}); });
}; };
}; };
@ -604,13 +604,13 @@ var link = (function () {
return function () { return function () {
var self = this; var self = this;
var toggleVisibility = function (e) { var toggleVisibility = function (e) {
if ($_5298ug0jjgweci0.hasLinks(e.parents)) { if (Utils.hasLinks(e.parents)) {
self.show(); self.show();
} else { } else {
self.hide(); self.hide();
} }
}; };
if (!$_5298ug0jjgweci0.hasLinks(editor.dom.getParents(editor.selection.getStart()))) { if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
self.hide(); self.hide();
} }
editor.on('nodechange', toggleVisibility); editor.on('nodechange', toggleVisibility);
@ -619,7 +619,7 @@ var link = (function () {
}); });
}; };
}; };
var $_8hceq8ftjjgweche = { var Actions = {
openDialog: openDialog, openDialog: openDialog,
gotoSelectedLink: gotoSelectedLink, gotoSelectedLink: gotoSelectedLink,
leftClickedOnAHref: leftClickedOnAHref, leftClickedOnAHref: leftClickedOnAHref,
@ -629,35 +629,35 @@ var link = (function () {
}; };
var register = function (editor) { var register = function (editor) {
editor.addCommand('mceLink', $_8hceq8ftjjgweche.openDialog(editor)); editor.addCommand('mceLink', Actions.openDialog(editor));
}; };
var $_bauc80fsjjgwechc = { register: register }; var Commands = { register: register };
var setup = function (editor) { var setup = function (editor) {
editor.addShortcut('Meta+K', '', $_8hceq8ftjjgweche.openDialog(editor)); editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
}; };
var $_49u4p1g5jjgwecie = { setup: setup }; var Keyboard = { setup: setup };
var setupButtons = function (editor) { var setupButtons = function (editor) {
editor.addButton('link', { editor.addButton('link', {
active: false, active: false,
icon: 'link', icon: 'link',
tooltip: 'Insert/edit link', tooltip: 'Insert/edit link',
onclick: $_8hceq8ftjjgweche.openDialog(editor), onclick: Actions.openDialog(editor),
onpostrender: $_8hceq8ftjjgweche.toggleActiveState(editor) onpostrender: Actions.toggleActiveState(editor)
}); });
editor.addButton('unlink', { editor.addButton('unlink', {
active: false, active: false,
icon: 'unlink', icon: 'unlink',
tooltip: 'Remove link', tooltip: 'Remove link',
onclick: $_5298ug0jjgweci0.unlink(editor), onclick: Utils.unlink(editor),
onpostrender: $_8hceq8ftjjgweche.toggleActiveState(editor) onpostrender: Actions.toggleActiveState(editor)
}); });
if (editor.addContextToolbar) { if (editor.addContextToolbar) {
editor.addButton('openlink', { editor.addButton('openlink', {
icon: 'newtab', icon: 'newtab',
tooltip: 'Open link', tooltip: 'Open link',
onclick: $_8hceq8ftjjgweche.gotoSelectedLink(editor) onclick: Actions.gotoSelectedLink(editor)
}); });
} }
}; };
@ -665,15 +665,15 @@ var link = (function () {
editor.addMenuItem('openlink', { editor.addMenuItem('openlink', {
text: 'Open link', text: 'Open link',
icon: 'newtab', icon: 'newtab',
onclick: $_8hceq8ftjjgweche.gotoSelectedLink(editor), onclick: Actions.gotoSelectedLink(editor),
onPostRender: $_8hceq8ftjjgweche.toggleViewLinkState(editor), onPostRender: Actions.toggleViewLinkState(editor),
prependToContext: true prependToContext: true
}); });
editor.addMenuItem('link', { editor.addMenuItem('link', {
icon: 'link', icon: 'link',
text: 'Link', text: 'Link',
shortcut: 'Meta+K', shortcut: 'Meta+K',
onclick: $_8hceq8ftjjgweche.openDialog(editor), onclick: Actions.openDialog(editor),
stateSelector: 'a[href]', stateSelector: 'a[href]',
context: 'insert', context: 'insert',
prependToContext: true prependToContext: true
@ -681,28 +681,28 @@ var link = (function () {
editor.addMenuItem('unlink', { editor.addMenuItem('unlink', {
icon: 'unlink', icon: 'unlink',
text: 'Remove link', text: 'Remove link',
onclick: $_5298ug0jjgweci0.unlink(editor), onclick: Utils.unlink(editor),
stateSelector: 'a[href]' stateSelector: 'a[href]'
}); });
}; };
var setupContextToolbars = function (editor) { var setupContextToolbars = function (editor) {
if (editor.addContextToolbar) { if (editor.addContextToolbar) {
editor.addContextToolbar($_8hceq8ftjjgweche.leftClickedOnAHref(editor), 'openlink | link unlink'); editor.addContextToolbar(Actions.leftClickedOnAHref(editor), 'openlink | link unlink');
} }
}; };
var $_bn93cg6jjgwecif = { var Controls = {
setupButtons: setupButtons, setupButtons: setupButtons,
setupMenuItems: setupMenuItems, setupMenuItems: setupMenuItems,
setupContextToolbars: setupContextToolbars setupContextToolbars: setupContextToolbars
}; };
global.add('link', function (editor) { global.add('link', function (editor) {
$_bn93cg6jjgwecif.setupButtons(editor); Controls.setupButtons(editor);
$_bn93cg6jjgwecif.setupMenuItems(editor); Controls.setupMenuItems(editor);
$_bn93cg6jjgwecif.setupContextToolbars(editor); Controls.setupContextToolbars(editor);
$_8hceq8ftjjgweche.setupGotoLinks(editor); Actions.setupGotoLinks(editor);
$_bauc80fsjjgwechc.register(editor); Commands.register(editor);
$_49u4p1g5jjgwecie.setup(editor); Keyboard.setup(editor);
}); });
function Plugin () { function Plugin () {
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@ var media = (function () {
var hasDimensions = function (editor) { var hasDimensions = function (editor) {
return editor.getParam('media_dimensions', true); return editor.getParam('media_dimensions', true);
}; };
var $_69rpmgh3jjgwecnr = { var Settings = {
getScripts: getScripts, getScripts: getScripts,
getAudioTemplateCallback: getAudioTemplateCallback, getAudioTemplateCallback: getAudioTemplateCallback,
getVideoTemplateCallback: getVideoTemplateCallback, getVideoTemplateCallback: getVideoTemplateCallback,
@ -60,7 +60,7 @@ var media = (function () {
} }
} }
}; };
var $_4q3fmh7jjgwecnw = { getVideoScriptMatch: getVideoScriptMatch }; var VideoScript = { getVideoScriptMatch: getVideoScriptMatch };
var trimPx = function (value) { var trimPx = function (value) {
return value.replace(/px$/, ''); return value.replace(/px$/, '');
@ -80,7 +80,7 @@ var media = (function () {
} }
}; };
}; };
var $_jbvx7h8jjgwecnx = { var Size = {
getMaxWidth: getSize('maxWidth'), getMaxWidth: getSize('maxWidth'),
getMaxHeight: getSize('maxHeight'), getMaxHeight: getSize('maxHeight'),
setMaxWidth: setSize('maxWidth'), setMaxWidth: setSize('maxWidth'),
@ -112,7 +112,7 @@ var media = (function () {
data = global$2.extend(attrs.map, data); data = global$2.extend(attrs.map, data);
} }
if (name === 'script') { if (name === 'script') {
var videoScript = $_4q3fmh7jjgwecnw.getVideoScriptMatch(prefixes, attrs.map.src); var videoScript = VideoScript.getVideoScriptMatch(prefixes, attrs.map.src);
if (!videoScript) { if (!videoScript) {
return; return;
} }
@ -148,14 +148,14 @@ var media = (function () {
source1: getEphoxEmbedIri(div), source1: getEphoxEmbedIri(div),
source2: '', source2: '',
poster: '', poster: '',
width: $_jbvx7h8jjgwecnx.getMaxWidth(div), width: Size.getMaxWidth(div),
height: $_jbvx7h8jjgwecnx.getMaxHeight(div) height: Size.getMaxHeight(div)
}; };
}; };
var htmlToData = function (prefixes, html) { var htmlToData = function (prefixes, html) {
return isEphoxEmbed(html) ? ephoxEmbedHtmlToData(html) : htmlToDataSax(prefixes, html); return isEphoxEmbed(html) ? ephoxEmbedHtmlToData(html) : htmlToDataSax(prefixes, html);
}; };
var $_6mep3hh4jjgwecnt = { htmlToData: htmlToData }; var HtmlToData = { htmlToData: htmlToData };
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise'); var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise');
@ -172,7 +172,7 @@ var media = (function () {
var mime = mimes[fileEnd]; var mime = mimes[fileEnd];
return mime ? mime : ''; return mime ? mime : '';
}; };
var $_d9gn6bhcjjgwecol = { guess: guess }; var Mime = { guess: guess };
var global$6 = tinymce.util.Tools.resolve('tinymce.html.Writer'); var global$6 = tinymce.util.Tools.resolve('tinymce.html.Writer');
@ -321,14 +321,14 @@ var media = (function () {
var updateEphoxEmbed = function (html, data) { var updateEphoxEmbed = function (html, data) {
var fragment = DOM$1.createFragment(html); var fragment = DOM$1.createFragment(html);
var div = fragment.firstChild; var div = fragment.firstChild;
$_jbvx7h8jjgwecnx.setMaxWidth(div, data.width); Size.setMaxWidth(div, data.width);
$_jbvx7h8jjgwecnx.setMaxHeight(div, data.height); Size.setMaxHeight(div, data.height);
return normalizeHtml(div.outerHTML); return normalizeHtml(div.outerHTML);
}; };
var updateHtml = function (html, data, updateAll) { var updateHtml = function (html, data, updateAll) {
return isEphoxEmbed$1(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll); return isEphoxEmbed$1(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll);
}; };
var $_s3qkohdjjgwecon = { updateHtml: updateHtml }; var UpdateHtml = { updateHtml: updateHtml };
var urlPatterns = [ var urlPatterns = [
{ {
@ -452,7 +452,7 @@ var media = (function () {
var dataToHtml = function (editor, dataIn) { var dataToHtml = function (editor, dataIn) {
var data = global$2.extend({}, dataIn); var data = global$2.extend({}, dataIn);
if (!data.source1) { if (!data.source1) {
global$2.extend(data, $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.getScripts(editor), data.embed)); global$2.extend(data, HtmlToData.htmlToData(Settings.getScripts(editor), data.embed));
if (!data.source1) { if (!data.source1) {
return ''; return '';
} }
@ -465,8 +465,8 @@ var media = (function () {
} }
data.source1 = editor.convertURL(data.source1, 'source'); data.source1 = editor.convertURL(data.source1, 'source');
data.source2 = editor.convertURL(data.source2, 'source'); data.source2 = editor.convertURL(data.source2, 'source');
data.source1mime = $_d9gn6bhcjjgwecol.guess(data.source1); data.source1mime = Mime.guess(data.source1);
data.source2mime = $_d9gn6bhcjjgwecol.guess(data.source2); data.source2mime = Mime.guess(data.source2);
data.poster = editor.convertURL(data.poster, 'poster'); data.poster = editor.convertURL(data.poster, 'poster');
var pattern = matchPattern(data.source1); var pattern = matchPattern(data.source1);
if (pattern) { if (pattern) {
@ -477,16 +477,16 @@ var media = (function () {
data.height = data.height || pattern.h; data.height = data.height || pattern.h;
} }
if (data.embed) { if (data.embed) {
return $_s3qkohdjjgwecon.updateHtml(data.embed, data, true); return UpdateHtml.updateHtml(data.embed, data, true);
} else { } else {
var videoScript = $_4q3fmh7jjgwecnw.getVideoScriptMatch($_69rpmgh3jjgwecnr.getScripts(editor), data.source1); var videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), data.source1);
if (videoScript) { if (videoScript) {
data.type = 'script'; data.type = 'script';
data.width = videoScript.width; data.width = videoScript.width;
data.height = videoScript.height; data.height = videoScript.height;
} }
var audioTemplateCallback = $_69rpmgh3jjgwecnr.getAudioTemplateCallback(editor); var audioTemplateCallback = Settings.getAudioTemplateCallback(editor);
var videoTemplateCallback = $_69rpmgh3jjgwecnr.getVideoTemplateCallback(editor); var videoTemplateCallback = Settings.getVideoTemplateCallback(editor);
data.width = data.width || 300; data.width = data.width || 300;
data.height = data.height || 150; data.height = data.height || 150;
global$2.each(data, function (value, key) { global$2.each(data, function (value, key) {
@ -505,7 +505,7 @@ var media = (function () {
} }
} }
}; };
var $_bc7nlthbjjgwecoh = { dataToHtml: dataToHtml }; var DataToHtml = { dataToHtml: dataToHtml };
var cache = {}; var cache = {};
var embedPromise = function (data, dataToHtml, handler) { var embedPromise = function (data, dataToHtml, handler) {
@ -536,17 +536,17 @@ var media = (function () {
}; };
var loadedData = function (editor) { var loadedData = function (editor) {
return function (data) { return function (data) {
return $_bc7nlthbjjgwecoh.dataToHtml(editor, data); return DataToHtml.dataToHtml(editor, data);
}; };
}; };
var getEmbedHtml = function (editor, data) { var getEmbedHtml = function (editor, data) {
var embedHandler = $_69rpmgh3jjgwecnr.getUrlResolver(editor); var embedHandler = Settings.getUrlResolver(editor);
return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor)); return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
}; };
var isCached = function (url) { var isCached = function (url) {
return cache.hasOwnProperty(url); return cache.hasOwnProperty(url);
}; };
var $_cwvqyth9jjgweco9 = { var Service = {
getEmbedHtml: getEmbedHtml, getEmbedHtml: getEmbedHtml,
isCached: isCached isCached: isCached
}; };
@ -631,7 +631,7 @@ var media = (function () {
] ]
}; };
}; };
var $_ewaahuhhjjgwecow = { var SizeManager = {
createUi: createUi, createUi: createUi,
syncSize: syncSize, syncSize: syncSize,
updateSize: updateSize updateSize: updateSize
@ -654,11 +654,11 @@ var media = (function () {
return { return {
'source1': dataEmbed, 'source1': dataEmbed,
'data-ephox-embed-iri': dataEmbed, 'data-ephox-embed-iri': dataEmbed,
'width': $_jbvx7h8jjgwecnx.getMaxWidth(element), 'width': Size.getMaxWidth(element),
'height': $_jbvx7h8jjgwecnx.getMaxHeight(element) 'height': Size.getMaxHeight(element)
}; };
} }
return element.getAttribute('data-mce-object') ? $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.getScripts(editor), editor.serializer.serialize(element, { selection: true })) : {}; return element.getAttribute('data-mce-object') ? HtmlToData.htmlToData(Settings.getScripts(editor), editor.serializer.serialize(element, { selection: true })) : {};
}; };
var getSource = function (editor) { var getSource = function (editor) {
var elm = editor.selection.getNode(); var elm = editor.selection.getNode();
@ -670,11 +670,11 @@ var media = (function () {
return function (response) { return function (response) {
var html = response.html; var html = response.html;
var embed = win.find('#embed')[0]; var embed = win.find('#embed')[0];
var data = global$2.extend($_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.getScripts(editor), html), { source1: response.url }); var data = global$2.extend(HtmlToData.htmlToData(Settings.getScripts(editor), html), { source1: response.url });
win.fromJSON(data); win.fromJSON(data);
if (embed) { if (embed) {
embed.value(html); embed.value(html);
$_ewaahuhhjjgwecow.updateSize(win); SizeManager.updateSize(win);
} }
}; };
}; };
@ -699,11 +699,11 @@ var media = (function () {
}; };
var submitForm = function (win, editor) { var submitForm = function (win, editor) {
var data = win.toJSON(); var data = win.toJSON();
data.embed = $_s3qkohdjjgwecon.updateHtml(data.embed, data); data.embed = UpdateHtml.updateHtml(data.embed, data);
if (data.embed && $_cwvqyth9jjgweco9.isCached(data.source1)) { if (data.embed && Service.isCached(data.source1)) {
handleInsert(editor, data.embed); handleInsert(editor, data.embed);
} else { } else {
$_cwvqyth9jjgweco9.getEmbedHtml(editor, data).then(function (response) { Service.getEmbedHtml(editor, data).then(function (response) {
handleInsert(editor, response.html); handleInsert(editor, response.html);
}).catch(handleError(editor)); }).catch(handleError(editor));
} }
@ -725,11 +725,11 @@ var media = (function () {
label: 'Source', label: 'Source',
onpaste: function () { onpaste: function () {
setTimeout(function () { setTimeout(function () {
$_cwvqyth9jjgweco9.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor)); Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
}, 1); }, 1);
}, },
onchange: function (e) { onchange: function (e) {
$_cwvqyth9jjgweco9.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor)); Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
populateMeta(win, e.meta); populateMeta(win, e.meta);
}, },
onbeforecall: function (e) { onbeforecall: function (e) {
@ -740,9 +740,9 @@ var media = (function () {
var reserialise = function (update) { var reserialise = function (update) {
update(win); update(win);
data = win.toJSON(); data = win.toJSON();
win.find('#embed').value($_s3qkohdjjgwecon.updateHtml(data.embed, data)); win.find('#embed').value(UpdateHtml.updateHtml(data.embed, data));
}; };
if ($_69rpmgh3jjgwecnr.hasAltSource(editor)) { if (Settings.hasAltSource(editor)) {
advancedFormItems.push({ advancedFormItems.push({
name: 'source2', name: 'source2',
type: 'filepicker', type: 'filepicker',
@ -751,7 +751,7 @@ var media = (function () {
label: 'Alternative source' label: 'Alternative source'
}); });
} }
if ($_69rpmgh3jjgwecnr.hasPoster(editor)) { if (Settings.hasPoster(editor)) {
advancedFormItems.push({ advancedFormItems.push({
name: 'poster', name: 'poster',
type: 'filepicker', type: 'filepicker',
@ -760,8 +760,8 @@ var media = (function () {
label: 'Poster' label: 'Poster'
}); });
} }
if ($_69rpmgh3jjgwecnr.hasDimensions(editor)) { if (Settings.hasDimensions(editor)) {
var control = $_ewaahuhhjjgwecow.createUi(reserialise); var control = SizeManager.createUi(reserialise);
generalFormItems.push(control); generalFormItems.push(control);
} }
data = getData(editor); data = getData(editor);
@ -776,7 +776,7 @@ var media = (function () {
label: 'Source' label: 'Source'
}; };
var updateValueOnChange = function () { var updateValueOnChange = function () {
data = global$2.extend({}, $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.getScripts(editor), this.value())); data = global$2.extend({}, HtmlToData.htmlToData(Settings.getScripts(editor), this.value()));
this.parent().parent().fromJSON(data); this.parent().parent().fromJSON(data);
}; };
embedTextBox[embedChange] = updateValueOnChange; embedTextBox[embedChange] = updateValueOnChange;
@ -817,34 +817,34 @@ var media = (function () {
bodyType: 'tabpanel', bodyType: 'tabpanel',
body: body, body: body,
onSubmit: function () { onSubmit: function () {
$_ewaahuhhjjgwecow.updateSize(win); SizeManager.updateSize(win);
submitForm(win, editor); submitForm(win, editor);
} }
}); });
$_ewaahuhhjjgwecow.syncSize(win); SizeManager.syncSize(win);
}; };
var $_e3lvjbh0jjgwecnm = { showDialog: showDialog }; var Dialog = { showDialog: showDialog };
var get = function (editor) { var get = function (editor) {
var showDialog = function () { var showDialog = function () {
$_e3lvjbh0jjgwecnm.showDialog(editor); Dialog.showDialog(editor);
}; };
return { showDialog: showDialog }; return { showDialog: showDialog };
}; };
var $_9lh0mgzjjgwecnk = { get: get }; var Api = { get: get };
var register = function (editor) { var register = function (editor) {
var showDialog = function () { var showDialog = function () {
$_e3lvjbh0jjgwecnm.showDialog(editor); Dialog.showDialog(editor);
}; };
editor.addCommand('mceMedia', showDialog); editor.addCommand('mceMedia', showDialog);
}; };
var $_3pne6fhijjgwecoz = { register: register }; var Commands = { register: register };
var global$8 = tinymce.util.Tools.resolve('tinymce.html.Node'); var global$8 = tinymce.util.Tools.resolve('tinymce.html.Node');
var sanitize = function (editor, html) { var sanitize = function (editor, html) {
if ($_69rpmgh3jjgwecnr.shouldFilterHtml(editor) === false) { if (Settings.shouldFilterHtml(editor) === false) {
return html; return html;
} }
var writer = global$6(); var writer = global$6();
@ -887,7 +887,7 @@ var media = (function () {
}, global$7({})).parse(html); }, global$7({})).parse(html);
return writer.getContent(); return writer.getContent();
}; };
var $_58i2qvhmjjgwecp7 = { sanitize: sanitize }; var Sanitize = { sanitize: sanitize };
var createPlaceholderNode = function (editor, node) { var createPlaceholderNode = function (editor, node) {
var placeHolder; var placeHolder;
@ -954,7 +954,7 @@ var media = (function () {
} }
innerHtml = sourceNode.firstChild && sourceNode.firstChild.value; innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
if (innerHtml) { if (innerHtml) {
targetNode.attr('data-mce-html', escape($_58i2qvhmjjgwecp7.sanitize(editor, innerHtml))); targetNode.attr('data-mce-html', escape(Sanitize.sanitize(editor, innerHtml)));
targetNode.firstChild = null; targetNode.firstChild = null;
} }
}; };
@ -980,7 +980,7 @@ var media = (function () {
continue; continue;
} }
if (node.name === 'script') { if (node.name === 'script') {
videoScript = $_4q3fmh7jjgwecnw.getVideoScriptMatch($_69rpmgh3jjgwecnr.getScripts(editor), node.attr('src')); videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), node.attr('src'));
if (!videoScript) { if (!videoScript) {
continue; continue;
} }
@ -993,7 +993,7 @@ var media = (function () {
node.attr('height', videoScript.height.toString()); node.attr('height', videoScript.height.toString());
} }
} }
if (node.name === 'iframe' && $_69rpmgh3jjgwecnr.hasLiveEmbeds(editor) && global$1.ceFalse) { if (node.name === 'iframe' && Settings.hasLiveEmbeds(editor) && global$1.ceFalse) {
if (!isWithinEphoxEmbed(node)) { if (!isWithinEphoxEmbed(node)) {
node.replace(createPreviewIframeNode(editor, node)); node.replace(createPreviewIframeNode(editor, node));
} }
@ -1005,7 +1005,7 @@ var media = (function () {
} }
}; };
}; };
var $_ggjz3ehljjgwecp4 = { var Nodes = {
createPreviewIframeNode: createPreviewIframeNode, createPreviewIframeNode: createPreviewIframeNode,
createPlaceholderNode: createPlaceholderNode, createPlaceholderNode: createPlaceholderNode,
placeHolderConverter: placeHolderConverter placeHolderConverter: placeHolderConverter
@ -1021,7 +1021,7 @@ var media = (function () {
global$2.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) { global$2.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
boolAttrs[name] = {}; boolAttrs[name] = {};
}); });
editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', $_ggjz3ehljjgwecp4.placeHolderConverter(editor)); editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', Nodes.placeHolderConverter(editor));
editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) { editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
var i = nodes.length; var i = nodes.length;
var node; var node;
@ -1069,7 +1069,7 @@ var media = (function () {
if (innerHtml) { if (innerHtml) {
innerNode = new global$8('#text', 3); innerNode = new global$8('#text', 3);
innerNode.raw = true; innerNode.raw = true;
innerNode.value = $_58i2qvhmjjgwecp7.sanitize(editor, unescape(innerHtml)); innerNode.value = Sanitize.sanitize(editor, unescape(innerHtml));
realElm.append(innerNode); realElm.append(innerNode);
} }
node.replace(realElm); node.replace(realElm);
@ -1085,7 +1085,7 @@ var media = (function () {
}); });
}); });
}; };
var $_4o7ga9hjjjgwecp0 = { setup: setup }; var FilterContent = { setup: setup };
var setup$1 = function (editor) { var setup$1 = function (editor) {
editor.on('ResolveName', function (e) { editor.on('ResolveName', function (e) {
@ -1095,7 +1095,7 @@ var media = (function () {
} }
}); });
}; };
var $_1y6lb6hnjjgwecp9 = { setup: setup$1 }; var ResolveName = { setup: setup$1 };
var setup$2 = function (editor) { var setup$2 = function (editor) {
editor.on('click keyup', function () { editor.on('click keyup', function () {
@ -1119,7 +1119,7 @@ var media = (function () {
html = target.getAttribute('data-mce-html'); html = target.getAttribute('data-mce-html');
if (html) { if (html) {
html = unescape(html); html = unescape(html);
target.setAttribute('data-mce-html', escape($_s3qkohdjjgwecon.updateHtml(html, { target.setAttribute('data-mce-html', escape(UpdateHtml.updateHtml(html, {
width: e.width, width: e.width,
height: e.height height: e.height
}))); })));
@ -1127,7 +1127,7 @@ var media = (function () {
} }
}); });
}; };
var $_dnm1d2hojjgwecpa = { setup: setup$2 }; var Selection = { setup: setup$2 };
var register$1 = function (editor) { var register$1 = function (editor) {
editor.addButton('media', { editor.addButton('media', {
@ -1147,15 +1147,15 @@ var media = (function () {
prependToContext: true prependToContext: true
}); });
}; };
var $_94c7u1hpjjgwecpc = { register: register$1 }; var Buttons = { register: register$1 };
global.add('media', function (editor) { global.add('media', function (editor) {
$_3pne6fhijjgwecoz.register(editor); Commands.register(editor);
$_94c7u1hpjjgwecpc.register(editor); Buttons.register(editor);
$_1y6lb6hnjjgwecp9.setup(editor); ResolveName.setup(editor);
$_4o7ga9hjjjgwecp0.setup(editor); FilterContent.setup(editor);
$_dnm1d2hojjgwecpa.setup(editor); Selection.setup(editor);
return $_9lh0mgzjjgwecnk.get(editor); return Api.get(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -32,7 +32,7 @@ var paste = (function () {
return false; return false;
} }
}; };
var $_15bf6siejjgwect1 = { hasProPlugin: hasProPlugin }; var DetectProPlugin = { hasProPlugin: hasProPlugin };
var get = function (clipboard, quirks) { var get = function (clipboard, quirks) {
return { return {
@ -40,7 +40,7 @@ var paste = (function () {
quirks: quirks quirks: quirks
}; };
}; };
var $_6gtliyigjjgwecte = { get: get }; var Api = { get: get };
var firePastePreProcess = function (editor, html, internal, isWordHtml) { var firePastePreProcess = function (editor, html, internal, isWordHtml) {
return editor.fire('PastePreProcess', { return editor.fire('PastePreProcess', {
@ -62,7 +62,7 @@ var paste = (function () {
var firePaste = function (editor, ieFake) { var firePaste = function (editor, ieFake) {
return editor.fire('paste', { ieFake: ieFake }); return editor.fire('paste', { ieFake: ieFake });
}; };
var $_8tki3zijjjgwectj = { var Events = {
firePastePreProcess: firePastePreProcess, firePastePreProcess: firePastePreProcess,
firePastePostProcess: firePastePostProcess, firePastePostProcess: firePastePostProcess,
firePastePlainTextToggle: firePastePlainTextToggle, firePastePlainTextToggle: firePastePlainTextToggle,
@ -115,7 +115,7 @@ var paste = (function () {
var shouldUseDefaultFilters = function (editor) { var shouldUseDefaultFilters = function (editor) {
return editor.getParam('paste_enable_default_filters', true); return editor.getParam('paste_enable_default_filters', true);
}; };
var $_xr8b0ikjjgwectl = { var Settings = {
shouldPlainTextInform: shouldPlainTextInform, shouldPlainTextInform: shouldPlainTextInform,
shouldBlockDrop: shouldBlockDrop, shouldBlockDrop: shouldBlockDrop,
shouldPasteDataImages: shouldPasteDataImages, shouldPasteDataImages: shouldPasteDataImages,
@ -134,7 +134,7 @@ var paste = (function () {
}; };
var shouldInformUserAboutPlainText = function (editor, userIsInformedState) { var shouldInformUserAboutPlainText = function (editor, userIsInformedState) {
return userIsInformedState.get() === false && $_xr8b0ikjjgwectl.shouldPlainTextInform(editor); return userIsInformedState.get() === false && Settings.shouldPlainTextInform(editor);
}; };
var displayNotification = function (editor, message) { var displayNotification = function (editor, message) {
editor.notificationManager.open({ editor.notificationManager.open({
@ -145,10 +145,10 @@ var paste = (function () {
var togglePlainTextPaste = function (editor, clipboard, userIsInformedState) { var togglePlainTextPaste = function (editor, clipboard, userIsInformedState) {
if (clipboard.pasteFormat.get() === 'text') { if (clipboard.pasteFormat.get() === 'text') {
clipboard.pasteFormat.set('html'); clipboard.pasteFormat.set('html');
$_8tki3zijjjgwectj.firePastePlainTextToggle(editor, false); Events.firePastePlainTextToggle(editor, false);
} else { } else {
clipboard.pasteFormat.set('text'); clipboard.pasteFormat.set('text');
$_8tki3zijjjgwectj.firePastePlainTextToggle(editor, true); Events.firePastePlainTextToggle(editor, true);
if (shouldInformUserAboutPlainText(editor, userIsInformedState)) { if (shouldInformUserAboutPlainText(editor, userIsInformedState)) {
displayNotification(editor, 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.'); displayNotification(editor, 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.');
userIsInformedState.set(true); userIsInformedState.set(true);
@ -156,11 +156,11 @@ var paste = (function () {
} }
editor.focus(); editor.focus();
}; };
var $_2j7vw7iijjgwecti = { togglePlainTextPaste: togglePlainTextPaste }; var Actions = { togglePlainTextPaste: togglePlainTextPaste };
var register = function (editor, clipboard, userIsInformedState) { var register = function (editor, clipboard, userIsInformedState) {
editor.addCommand('mceTogglePlainTextPaste', function () { editor.addCommand('mceTogglePlainTextPaste', function () {
$_2j7vw7iijjgwecti.togglePlainTextPaste(editor, clipboard, userIsInformedState); Actions.togglePlainTextPaste(editor, clipboard, userIsInformedState);
}); });
editor.addCommand('mceInsertClipboardContent', function (ui, value) { editor.addCommand('mceInsertClipboardContent', function (ui, value) {
if (value.content) { if (value.content) {
@ -171,7 +171,7 @@ var paste = (function () {
} }
}); });
}; };
var $_fldd1mihjjgwecth = { register: register }; var Commands = { register: register };
var global$1 = tinymce.util.Tools.resolve('tinymce.Env'); var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
@ -192,7 +192,7 @@ var paste = (function () {
var isMarked = function (html) { var isMarked = function (html) {
return html.indexOf(internalMark) !== -1; return html.indexOf(internalMark) !== -1;
}; };
var $_4x13hjirjjgwecu1 = { var InternalHtml = {
mark: mark, mark: mark,
unmark: unmark, unmark: unmark,
isMarked: isMarked, isMarked: isMarked,
@ -240,7 +240,7 @@ var paste = (function () {
var convert = function (text, rootTag, rootAttrs) { var convert = function (text, rootTag, rootAttrs) {
return rootTag ? toBlockElements(text, rootTag, rootAttrs) : toBRs(text); return rootTag ? toBlockElements(text, rootTag, rootAttrs) : toBRs(text);
}; };
var $_4h3hnrisjjgwecu2 = { var Newlines = {
isPlainText: isPlainText, isPlainText: isPlainText,
convert: convert, convert: convert,
toBRs: toBRs, toBRs: toBRs,
@ -278,6 +278,9 @@ var paste = (function () {
text += '\n'; text += '\n';
return; return;
} }
if (name$$1 === 'wbr') {
return;
}
if (shortEndedElements[name$$1]) { if (shortEndedElements[name$$1]) {
text += ' '; text += ' ';
} }
@ -334,7 +337,7 @@ var paste = (function () {
var isMsEdge = function () { var isMsEdge = function () {
return navigator.userAgent.indexOf(' Edge/') !== -1; return navigator.userAgent.indexOf(' Edge/') !== -1;
}; };
var $_4bi2o9j0jjgwecui = { var Utils = {
filter: filter, filter: filter,
innerText: innerText, innerText: innerText,
trimHtml: trimHtml, trimHtml: trimHtml,
@ -529,7 +532,7 @@ var paste = (function () {
if (name.indexOf('mso-') === 0) { if (name.indexOf('mso-') === 0) {
return; return;
} }
if ($_xr8b0ikjjgwectl.getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) { if (Settings.getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
outputStyles[name] = value; outputStyles[name] = value;
} }
}); });
@ -549,11 +552,11 @@ var paste = (function () {
} }
var filterWordContent = function (editor, content) { var filterWordContent = function (editor, content) {
var retainStyleProperties, validStyles; var retainStyleProperties, validStyles;
retainStyleProperties = $_xr8b0ikjjgwectl.getRetainStyleProps(editor); retainStyleProperties = Settings.getRetainStyleProps(editor);
if (retainStyleProperties) { if (retainStyleProperties) {
validStyles = global$3.makeMap(retainStyleProperties.split(/[, ]/)); validStyles = global$3.makeMap(retainStyleProperties.split(/[, ]/));
} }
content = $_4bi2o9j0jjgwecui.filter(content, [ content = Utils.filter(content, [
/<br class="?Apple-interchange-newline"?>/gi, /<br class="?Apple-interchange-newline"?>/gi,
/<b[^>]+id="?docs-internal-[^>]*>/gi, /<b[^>]+id="?docs-internal-[^>]*>/gi,
/<!--[\s\S]+?-->/gi, /<!--[\s\S]+?-->/gi,
@ -573,7 +576,7 @@ var paste = (function () {
} }
] ]
]); ]);
var validElements = $_xr8b0ikjjgwectl.getWordValidElements(editor); var validElements = Settings.getWordValidElements(editor);
var schema = global$8({ var schema = global$8({
valid_elements: validElements, valid_elements: validElements,
valid_children: '-li[p]' valid_children: '-li[p]'
@ -647,16 +650,16 @@ var paste = (function () {
} }
}); });
var rootNode = domParser.parse(content); var rootNode = domParser.parse(content);
if ($_xr8b0ikjjgwectl.shouldConvertWordFakeLists(editor)) { if (Settings.shouldConvertWordFakeLists(editor)) {
convertFakeListsToProperLists(rootNode); convertFakeListsToProperLists(rootNode);
} }
content = global$9({ validate: editor.settings.validate }, schema).serialize(rootNode); content = global$9({ validate: editor.settings.validate }, schema).serialize(rootNode);
return content; return content;
}; };
var preProcess = function (editor, content) { var preProcess = function (editor, content) {
return $_xr8b0ikjjgwectl.shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content; return Settings.shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
}; };
var $_dfatuiivjjgwecu8 = { var WordFilter = {
preProcess: preProcess, preProcess: preProcess,
isWordContent: isWordContent isWordContent: isWordContent
}; };
@ -669,11 +672,11 @@ var paste = (function () {
}; };
var postProcessFilter = function (editor, html, internal, isWordHtml) { var postProcessFilter = function (editor, html, internal, isWordHtml) {
var tempBody = editor.dom.create('div', { style: 'display:none' }, html); var tempBody = editor.dom.create('div', { style: 'display:none' }, html);
var postProcessArgs = $_8tki3zijjjgwectj.firePastePostProcess(editor, tempBody, internal, isWordHtml); var postProcessArgs = Events.firePastePostProcess(editor, tempBody, internal, isWordHtml);
return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented()); return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented());
}; };
var filterContent = function (editor, content, internal, isWordHtml) { var filterContent = function (editor, content, internal, isWordHtml) {
var preProcessArgs = $_8tki3zijjjgwectj.firePastePreProcess(editor, content, internal, isWordHtml); var preProcessArgs = Events.firePastePreProcess(editor, content, internal, isWordHtml);
if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) { if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
return postProcessFilter(editor, preProcessArgs.content, internal, isWordHtml); return postProcessFilter(editor, preProcessArgs.content, internal, isWordHtml);
} else { } else {
@ -681,15 +684,22 @@ var paste = (function () {
} }
}; };
var process = function (editor, html, internal) { var process = function (editor, html, internal) {
var isWordHtml = $_dfatuiivjjgwecu8.isWordContent(html); var isWordHtml = WordFilter.isWordContent(html);
var content = isWordHtml ? $_dfatuiivjjgwecu8.preProcess(editor, html) : html; var content = isWordHtml ? WordFilter.preProcess(editor, html) : html;
return filterContent(editor, content, internal, isWordHtml); return filterContent(editor, content, internal, isWordHtml);
}; };
var $_3scw66iujjgwecu4 = { process: process }; var ProcessFilters = { process: process };
var removeMeta = function (editor, html) {
var body = editor.dom.create('body', {}, html);
global$3.each(body.querySelectorAll('meta'), function (elm) {
return elm.parentNode.removeChild(elm);
});
return body.innerHTML;
};
var pasteHtml = function (editor, html) { var pasteHtml = function (editor, html) {
editor.insertContent(html, { editor.insertContent(removeMeta(editor, html), {
merge: $_xr8b0ikjjgwectl.shouldMergeFormats(editor), merge: Settings.shouldMergeFormats(editor),
paste: true paste: true
}); });
return true; return true;
@ -732,28 +742,378 @@ var paste = (function () {
}); });
}; };
var insertContent = function (editor, html) { var insertContent = function (editor, html) {
if ($_xr8b0ikjjgwectl.isSmartPasteEnabled(editor) === false) { if (Settings.isSmartPasteEnabled(editor) === false) {
pasteHtml(editor, html); pasteHtml(editor, html);
} else { } else {
smartInsertContent(editor, html); smartInsertContent(editor, html);
} }
}; };
var $_d8pzpej1jjgwecum = { var SmartPaste = {
isImageUrl: isImageUrl, isImageUrl: isImageUrl,
isAbsoluteUrl: isAbsoluteUrl, isAbsoluteUrl: isAbsoluteUrl,
insertContent: insertContent insertContent: insertContent
}; };
var constant = function (value) {
return function () {
return value;
};
};
function curry(fn) {
var initialArgs = [];
for (var _i = 1; _i < arguments.length; _i++) {
initialArgs[_i - 1] = arguments[_i];
}
return function () {
var restArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
restArgs[_i] = arguments[_i];
}
var all = initialArgs.concat(restArgs);
return fn.apply(null, all);
};
}
var never = constant(false);
var always = constant(true);
var never$1 = never;
var always$1 = always;
var none = function () {
return NONE;
};
var NONE = function () {
var eq = function (o) {
return o.isNone();
};
var call$$1 = function (thunk) {
return thunk();
};
var id = function (n) {
return n;
};
var noop$$1 = function () {
};
var nul = function () {
return null;
};
var undef = function () {
return undefined;
};
var me = {
fold: function (n, s) {
return n();
},
is: never$1,
isSome: never$1,
isNone: always$1,
getOr: id,
getOrThunk: call$$1,
getOrDie: function (msg) {
throw new Error(msg || 'error: getOrDie called on none.');
},
getOrNull: nul,
getOrUndefined: undef,
or: id,
orThunk: call$$1,
map: none,
ap: none,
each: noop$$1,
bind: none,
flatten: none,
exists: never$1,
forall: always$1,
filter: none,
equals: eq,
equals_: eq,
toArray: function () {
return [];
},
toString: constant('none()')
};
if (Object.freeze)
Object.freeze(me);
return me;
}();
var some = function (a) {
var constant_a = function () {
return a;
};
var self = function () {
return me;
};
var map = function (f) {
return some(f(a));
};
var bind = function (f) {
return f(a);
};
var me = {
fold: function (n, s) {
return s(a);
},
is: function (v) {
return a === v;
},
isSome: always$1,
isNone: never$1,
getOr: constant_a,
getOrThunk: constant_a,
getOrDie: constant_a,
getOrNull: constant_a,
getOrUndefined: constant_a,
or: self,
orThunk: self,
map: map,
ap: function (optfab) {
return optfab.fold(none, function (fab) {
return some(fab(a));
});
},
each: function (f) {
f(a);
},
bind: bind,
flatten: constant_a,
exists: bind,
forall: bind,
filter: function (f) {
return f(a) ? me : NONE;
},
equals: function (o) {
return o.is(a);
},
equals_: function (o, elementEq) {
return o.fold(never$1, function (b) {
return elementEq(a, b);
});
},
toArray: function () {
return [a];
},
toString: function () {
return 'some(' + a + ')';
}
};
return me;
};
var from = function (value) {
return value === null || value === undefined ? NONE : some(value);
};
var Option = {
some: some,
none: none,
from: from
};
var typeOf = function (x) {
if (x === null)
return 'null';
var t = typeof x;
if (t === 'object' && Array.prototype.isPrototypeOf(x))
return 'array';
if (t === 'object' && String.prototype.isPrototypeOf(x))
return 'string';
return t;
};
var isType = function (type) {
return function (value) {
return typeOf(value) === type;
};
};
var isFunction = isType('function');
var map = function (xs, f) {
var len = xs.length;
var r = new Array(len);
for (var i = 0; i < len; i++) {
var x = xs[i];
r[i] = f(x, i, xs);
}
return r;
};
var each = function (xs, f) {
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
f(x, i, xs);
}
};
var filter$1 = function (xs, pred) {
var r = [];
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
if (pred(x, i, xs)) {
r.push(x);
}
}
return r;
};
var slice = Array.prototype.slice;
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
return slice.call(x);
};
var nu = function (baseFn) {
var data = Option.none();
var callbacks = [];
var map$$1 = function (f) {
return nu(function (nCallback) {
get(function (data) {
nCallback(f(data));
});
});
};
var get = function (nCallback) {
if (isReady())
call(nCallback);
else
callbacks.push(nCallback);
};
var set = function (x) {
data = Option.some(x);
run(callbacks);
callbacks = [];
};
var isReady = function () {
return data.isSome();
};
var run = function (cbs) {
each(cbs, call);
};
var call = function (cb) {
data.each(function (x) {
setTimeout(function () {
cb(x);
}, 0);
});
};
baseFn(set);
return {
get: get,
map: map$$1,
isReady: isReady
};
};
var pure$1 = function (a) {
return nu(function (callback) {
callback(a);
});
};
var LazyValue = {
nu: nu,
pure: pure$1
};
var bounce = function (f) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var me = this;
setTimeout(function () {
f.apply(me, args);
}, 0);
};
};
var nu$1 = function (baseFn) {
var get = function (callback) {
baseFn(bounce(callback));
};
var map = function (fab) {
return nu$1(function (callback) {
get(function (a) {
var value = fab(a);
callback(value);
});
});
};
var bind = function (aFutureB) {
return nu$1(function (callback) {
get(function (a) {
aFutureB(a).get(callback);
});
});
};
var anonBind = function (futureB) {
return nu$1(function (callback) {
get(function (a) {
futureB.get(callback);
});
});
};
var toLazy = function () {
return LazyValue.nu(get);
};
var toCached = function () {
var cache = null;
return nu$1(function (callback) {
if (cache === null) {
cache = toLazy();
}
cache.get(callback);
});
};
return {
map: map,
bind: bind,
anonBind: anonBind,
toLazy: toLazy,
toCached: toCached,
get: get
};
};
var pure$2 = function (a) {
return nu$1(function (callback) {
callback(a);
});
};
var Future = {
nu: nu$1,
pure: pure$2
};
var par = function (asyncValues, nu) {
return nu(function (callback) {
var r = [];
var count = 0;
var cb = function (i) {
return function (value) {
r[i] = value;
count++;
if (count >= asyncValues.length) {
callback(r);
}
};
};
if (asyncValues.length === 0) {
callback([]);
} else {
each(asyncValues, function (asyncValue, i) {
asyncValue.get(cb(i));
});
}
});
};
var par$1 = function (futures) {
return par(futures, Future.nu);
};
var mapM = function (array, fn) {
var futures = map(array, fn);
return par$1(futures);
};
var pasteHtml$1 = function (editor, html, internalFlag) { var pasteHtml$1 = function (editor, html, internalFlag) {
var internal = internalFlag ? internalFlag : $_4x13hjirjjgwecu1.isMarked(html); var internal = internalFlag ? internalFlag : InternalHtml.isMarked(html);
var args = $_3scw66iujjgwecu4.process(editor, $_4x13hjirjjgwecu1.unmark(html), internal); var args = ProcessFilters.process(editor, InternalHtml.unmark(html), internal);
if (args.cancelled === false) { if (args.cancelled === false) {
$_d8pzpej1jjgwecum.insertContent(editor, args.content); SmartPaste.insertContent(editor, args.content);
} }
}; };
var pasteText = function (editor, text) { var pasteText = function (editor, text) {
text = editor.dom.encode(text).replace(/\r\n/g, '\n'); text = editor.dom.encode(text).replace(/\r\n/g, '\n');
text = $_4h3hnrisjjgwecu2.convert(text, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs); text = Newlines.convert(text, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs);
pasteHtml$1(editor, text, false); pasteHtml$1(editor, text, false);
}; };
var getDataTransferItems = function (dataTransfer) { var getDataTransferItems = function (dataTransfer) {
@ -783,7 +1143,7 @@ var paste = (function () {
}; };
var getClipboardContent = function (editor, clipboardEvent) { var getClipboardContent = function (editor, clipboardEvent) {
var content = getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer); var content = getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer);
return $_4bi2o9j0jjgwecui.isMsEdge() ? global$3.extend(content, { 'text/html': '' }) : content; return Utils.isMsEdge() ? global$3.extend(content, { 'text/html': '' }) : content;
}; };
var hasContentType = function (clipboardContent, mimeType) { var hasContentType = function (clipboardContent, mimeType) {
return mimeType in clipboardContent && clipboardContent[mimeType].length > 0; return mimeType in clipboardContent && clipboardContent[mimeType].length > 0;
@ -806,18 +1166,13 @@ var paste = (function () {
var m = str.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i); var m = str.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);
return m ? editor.dom.encode(m[1]) : null; return m ? editor.dom.encode(m[1]) : null;
}; };
var uniqueId = $_4bi2o9j0jjgwecui.createIdGenerator('mceclip'); var uniqueId = Utils.createIdGenerator('mceclip');
var pasteImage = function (editor, rng, reader, blob) { var pasteImage = function (editor, imageItem) {
if (rng) { var base64 = getBase64FromUri(imageItem.uri);
editor.selection.setRng(rng);
rng = null;
}
var dataUri = reader.result;
var base64 = getBase64FromUri(dataUri);
var id = uniqueId(); var id = uniqueId();
var name$$1 = editor.settings.images_reuse_filename && blob.name ? extractFilename(editor, blob.name) : id; var name$$1 = editor.settings.images_reuse_filename && imageItem.blob.name ? extractFilename(editor, imageItem.blob.name) : id;
var img = new Image(); var img = new Image();
img.src = dataUri; img.src = imageItem.uri;
if (isValidDataUriImage(editor.settings, img)) { if (isValidDataUriImage(editor.settings, img)) {
var blobCache = editor.editorUpload.blobCache; var blobCache = editor.editorUpload.blobCache;
var blobInfo = void 0, existingBlobInfo = void 0; var blobInfo = void 0, existingBlobInfo = void 0;
@ -825,41 +1180,62 @@ var paste = (function () {
return cachedBlobInfo.base64() === base64; return cachedBlobInfo.base64() === base64;
}); });
if (!existingBlobInfo) { if (!existingBlobInfo) {
blobInfo = blobCache.create(id, blob, base64, name$$1); blobInfo = blobCache.create(id, imageItem.blob, base64, name$$1);
blobCache.add(blobInfo); blobCache.add(blobInfo);
} else { } else {
blobInfo = existingBlobInfo; blobInfo = existingBlobInfo;
} }
pasteHtml$1(editor, '<img src="' + blobInfo.blobUri() + '">', false); pasteHtml$1(editor, '<img src="' + blobInfo.blobUri() + '">', false);
} else { } else {
pasteHtml$1(editor, '<img src="' + dataUri + '">', false); pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
} }
}; };
var isClipboardEvent = function (event$$1) { var isClipboardEvent = function (event$$1) {
return event$$1.type === 'paste'; return event$$1.type === 'paste';
}; };
var readBlobsAsDataUris = function (items) {
return mapM(items, function (item) {
return Future.nu(function (resolve) {
var blob = item.getAsFile ? item.getAsFile() : item;
var reader = new window.FileReader();
reader.onload = function () {
resolve({
blob: blob,
uri: reader.result
});
};
reader.readAsDataURL(blob);
});
});
};
var getImagesFromDataTransfer = function (dataTransfer) {
var items = dataTransfer.items ? map(from$1(dataTransfer.items), function (item) {
return item.getAsFile();
}) : [];
var files = dataTransfer.files ? from$1(dataTransfer.files) : [];
var images = filter$1(items.length > 0 ? items : files, function (file) {
return /^image\/(jpeg|png|gif|bmp)$/.test(file.type);
});
return images;
};
var pasteImageData = function (editor, e, rng) { var pasteImageData = function (editor, e, rng) {
var dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer; var dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer;
function processItems(items) {
var i, item, reader, hadImage = false;
if (items) {
for (i = 0; i < items.length; i++) {
item = items[i];
if (/^image\/(jpeg|png|gif|bmp)$/.test(item.type)) {
var blob = item.getAsFile ? item.getAsFile() : item;
reader = new window.FileReader();
reader.onload = pasteImage.bind(null, editor, rng, reader, blob);
reader.readAsDataURL(blob);
e.preventDefault();
hadImage = true;
}
}
}
return hadImage;
}
if (editor.settings.paste_data_images && dataTransfer) { if (editor.settings.paste_data_images && dataTransfer) {
return processItems(dataTransfer.items) || processItems(dataTransfer.files); var images = getImagesFromDataTransfer(dataTransfer);
if (images.length > 0) {
e.preventDefault();
readBlobsAsDataUris(images).get(function (blobResults) {
if (rng) {
editor.selection.setRng(rng);
} }
each(blobResults, function (result) {
pasteImage(editor, result);
});
});
return true;
}
}
return false;
}; };
var isBrokenAndroidClipboardEvent = function (e) { var isBrokenAndroidClipboardEvent = function (e) {
var clipboardData = e.clipboardData; var clipboardData = e.clipboardData;
@ -886,7 +1262,7 @@ var paste = (function () {
keyboardPasteTimeStamp = new Date().getTime(); keyboardPasteTimeStamp = new Date().getTime();
if (global$1.ie && keyboardPastePlainTextState) { if (global$1.ie && keyboardPastePlainTextState) {
e.preventDefault(); e.preventDefault();
$_8tki3zijjjgwectj.firePaste(editor, true); Events.firePaste(editor, true);
return; return;
} }
pasteBin.remove(); pasteBin.remove();
@ -903,14 +1279,14 @@ var paste = (function () {
content = clipboardContent['text/html']; content = clipboardContent['text/html'];
} else { } else {
content = pasteBin.getHtml(); content = pasteBin.getHtml();
internal = internal ? internal : $_4x13hjirjjgwecu1.isMarked(content); internal = internal ? internal : InternalHtml.isMarked(content);
if (pasteBin.isDefaultContent(content)) { if (pasteBin.isDefaultContent(content)) {
plainTextMode = true; plainTextMode = true;
} }
} }
content = $_4bi2o9j0jjgwecui.trimHtml(content); content = Utils.trimHtml(content);
pasteBin.remove(); pasteBin.remove();
isPlainTextHtml = internal === false && $_4h3hnrisjjgwecu2.isPlainText(content); isPlainTextHtml = internal === false && Newlines.isPlainText(content);
if (!content.length || isPlainTextHtml) { if (!content.length || isPlainTextHtml) {
plainTextMode = true; plainTextMode = true;
} }
@ -918,7 +1294,7 @@ var paste = (function () {
if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) { if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {
content = clipboardContent['text/plain']; content = clipboardContent['text/plain'];
} else { } else {
content = $_4bi2o9j0jjgwecui.innerText(content); content = Utils.innerText(content);
} }
} }
if (pasteBin.isDefaultContent(content)) { if (pasteBin.isDefaultContent(content)) {
@ -942,7 +1318,7 @@ var paste = (function () {
var clipboardDelay = new Date().getTime() - clipboardTimer; var clipboardDelay = new Date().getTime() - clipboardTimer;
var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp - clipboardDelay < 1000; var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp - clipboardDelay < 1000;
var plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState; var plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState;
var internal = hasContentType(clipboardContent, $_4x13hjirjjgwecu1.internalHtmlMime()); var internal = hasContentType(clipboardContent, InternalHtml.internalHtmlMime());
keyboardPastePlainTextState = false; keyboardPastePlainTextState = false;
if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) { if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
pasteBin.remove(); pasteBin.remove();
@ -966,7 +1342,7 @@ var paste = (function () {
if (hasContentType(clipboardContent, 'text/html')) { if (hasContentType(clipboardContent, 'text/html')) {
e.preventDefault(); e.preventDefault();
if (!internal) { if (!internal) {
internal = $_4x13hjirjjgwecu1.isMarked(clipboardContent['text/html']); internal = InternalHtml.isMarked(clipboardContent['text/html']);
} }
insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal); insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
} else { } else {
@ -1017,12 +1393,12 @@ var paste = (function () {
var isExternalPasteBin = function (editor) { var isExternalPasteBin = function (editor) {
return getPasteBinParent(editor) !== editor.getBody(); return getPasteBinParent(editor) !== editor.getBody();
}; };
var delegatePasteEvents = function (editor, pasteBinElm) { var delegatePasteEvents = function (editor, pasteBinElm, pasteBinDefaultContent) {
if (isExternalPasteBin(editor)) { if (isExternalPasteBin(editor)) {
editor.dom.bind(pasteBinElm, 'paste keyup', function (e) { editor.dom.bind(pasteBinElm, 'paste keyup', function (e) {
setTimeout(function () { if (!isDefault(editor, pasteBinDefaultContent)) {
editor.fire('paste'); editor.fire('paste');
}, 0); }
}); });
} }
}; };
@ -1043,7 +1419,7 @@ var paste = (function () {
dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function (e) { dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function (e) {
e.stopPropagation(); e.stopPropagation();
}); });
delegatePasteEvents(editor, pasteBinElm); delegatePasteEvents(editor, pasteBinElm, pasteBinDefaultContent);
pasteBinElm.focus(); pasteBinElm.focus();
editor.selection.select(pasteBinElm, true); editor.selection.select(pasteBinElm, true);
}; };
@ -1148,10 +1524,10 @@ var paste = (function () {
}; };
}; };
var noop = function () { var noop$1 = function () {
}; };
var hasWorkingClipboardApi = function (clipboardData) { var hasWorkingClipboardApi = function (clipboardData) {
return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && $_4bi2o9j0jjgwecui.isMsEdge() !== true; return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
}; };
var setHtml5Clipboard = function (clipboardData, html, text) { var setHtml5Clipboard = function (clipboardData, html, text) {
if (hasWorkingClipboardApi(clipboardData)) { if (hasWorkingClipboardApi(clipboardData)) {
@ -1159,7 +1535,7 @@ var paste = (function () {
clipboardData.clearData(); clipboardData.clearData();
clipboardData.setData('text/html', html); clipboardData.setData('text/html', html);
clipboardData.setData('text/plain', text); clipboardData.setData('text/plain', text);
clipboardData.setData($_4x13hjirjjgwecu1.internalHtmlMime(), html); clipboardData.setData(InternalHtml.internalHtmlMime(), html);
return true; return true;
} catch (e) { } catch (e) {
return false; return false;
@ -1178,7 +1554,7 @@ var paste = (function () {
}; };
var fallback = function (editor) { var fallback = function (editor) {
return function (html, done) { return function (html, done) {
var markedHtml = $_4x13hjirjjgwecu1.mark(html); var markedHtml = InternalHtml.mark(html);
var outer = editor.dom.create('div', { var outer = editor.dom.create('div', {
'contenteditable': 'false', 'contenteditable': 'false',
'data-mce-bogus': 'all' 'data-mce-bogus': 'all'
@ -1211,9 +1587,15 @@ var paste = (function () {
text: editor.selection.getContent({ format: 'text' }) text: editor.selection.getContent({ format: 'text' })
}; };
}; };
var isTableSelection = function (editor) {
return !!editor.dom.getParent(editor.selection.getStart(), 'td[data-mce-selected],th[data-mce-selected]', editor.getBody());
};
var hasSelectedContent = function (editor) {
return !editor.selection.isCollapsed() || isTableSelection(editor);
};
var cut = function (editor) { var cut = function (editor) {
return function (evt) { return function (evt) {
if (editor.selection.isCollapsed() === false) { if (hasSelectedContent(editor)) {
setClipboardData(evt, getData(editor), fallback(editor), function () { setClipboardData(evt, getData(editor), fallback(editor), function () {
setTimeout(function () { setTimeout(function () {
editor.execCommand('Delete'); editor.execCommand('Delete');
@ -1224,8 +1606,8 @@ var paste = (function () {
}; };
var copy = function (editor) { var copy = function (editor) {
return function (evt) { return function (evt) {
if (editor.selection.isCollapsed() === false) { if (hasSelectedContent(editor)) {
setClipboardData(evt, getData(editor), fallback(editor), noop); setClipboardData(evt, getData(editor), fallback(editor), noop$1);
} }
}; };
}; };
@ -1233,12 +1615,12 @@ var paste = (function () {
editor.on('cut', cut(editor)); editor.on('cut', cut(editor));
editor.on('copy', copy(editor)); editor.on('copy', copy(editor));
}; };
var $_32blojj3jjgwecv4 = { register: register$1 }; var CutCopy = { register: register$1 };
var global$10 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils'); var global$a = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
var getCaretRangeFromEvent = function (editor, e) { var getCaretRangeFromEvent = function (editor, e) {
return global$10.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc()); return global$a.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc());
}; };
var isPlainTextFileUrl = function (content) { var isPlainTextFileUrl = function (content) {
var plainTextContent = content['text/plain']; var plainTextContent = content['text/plain'];
@ -1249,13 +1631,13 @@ var paste = (function () {
editor.selection.setRng(rng); editor.selection.setRng(rng);
}; };
var setup = function (editor, clipboard, draggingInternallyState) { var setup = function (editor, clipboard, draggingInternallyState) {
if ($_xr8b0ikjjgwectl.shouldBlockDrop(editor)) { if (Settings.shouldBlockDrop(editor)) {
editor.on('dragend dragover draggesture dragdrop drop drag', function (e) { editor.on('dragend dragover draggesture dragdrop drop drag', function (e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
}); });
} }
if (!$_xr8b0ikjjgwectl.shouldPasteDataImages(editor)) { if (!Settings.shouldPasteDataImages(editor)) {
editor.on('drop', function (e) { editor.on('drop', function (e) {
var dataTransfer = e.dataTransfer; var dataTransfer = e.dataTransfer;
if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) { if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
@ -1270,11 +1652,11 @@ var paste = (function () {
return; return;
} }
dropContent = clipboard.getDataTransferItems(e.dataTransfer); dropContent = clipboard.getDataTransferItems(e.dataTransfer);
var internal = clipboard.hasContentType(dropContent, $_4x13hjirjjgwecu1.internalHtmlMime()); var internal = clipboard.hasContentType(dropContent, InternalHtml.internalHtmlMime());
if ((!clipboard.hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && clipboard.pasteImageData(e, rng)) { if ((!clipboard.hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && clipboard.pasteImageData(e, rng)) {
return; return;
} }
if (rng && $_xr8b0ikjjgwectl.shouldFilterDrop(editor)) { if (rng && Settings.shouldFilterDrop(editor)) {
var content_1 = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain']; var content_1 = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain'];
if (content_1) { if (content_1) {
e.preventDefault(); e.preventDefault();
@ -1284,7 +1666,7 @@ var paste = (function () {
editor.execCommand('Delete'); editor.execCommand('Delete');
} }
setFocusedRange(editor, rng); setFocusedRange(editor, rng);
content_1 = $_4bi2o9j0jjgwecui.trimHtml(content_1); content_1 = Utils.trimHtml(content_1);
if (!dropContent['text/html']) { if (!dropContent['text/html']) {
clipboard.pasteText(content_1); clipboard.pasteText(content_1);
} else { } else {
@ -1299,7 +1681,7 @@ var paste = (function () {
draggingInternallyState.set(true); draggingInternallyState.set(true);
}); });
editor.on('dragover dragend', function (e) { editor.on('dragover dragend', function (e) {
if ($_xr8b0ikjjgwectl.shouldPasteDataImages(editor) && draggingInternallyState.get() === false) { if (Settings.shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
e.preventDefault(); e.preventDefault();
setFocusedRange(editor, getCaretRangeFromEvent(editor, e)); setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
} }
@ -1308,24 +1690,24 @@ var paste = (function () {
} }
}); });
}; };
var $_b4etj0j4jjgwecv7 = { setup: setup }; var DragDrop = { setup: setup };
var setup$1 = function (editor) { var setup$1 = function (editor) {
var plugin = editor.plugins.paste; var plugin = editor.plugins.paste;
var preProcess = $_xr8b0ikjjgwectl.getPreProcess(editor); var preProcess = Settings.getPreProcess(editor);
if (preProcess) { if (preProcess) {
editor.on('PastePreProcess', function (e) { editor.on('PastePreProcess', function (e) {
preProcess.call(plugin, plugin, e); preProcess.call(plugin, plugin, e);
}); });
} }
var postProcess = $_xr8b0ikjjgwectl.getPostProcess(editor); var postProcess = Settings.getPostProcess(editor);
if (postProcess) { if (postProcess) {
editor.on('PastePostProcess', function (e) { editor.on('PastePostProcess', function (e) {
postProcess.call(plugin, plugin, e); postProcess.call(plugin, plugin, e);
}); });
} }
}; };
var $_c5bihmj6jjgwecva = { setup: setup$1 }; var PrePostProcess = { setup: setup$1 };
function addPreProcessFilter(editor, filterFunc) { function addPreProcessFilter(editor, filterFunc) {
editor.on('PastePreProcess', function (e) { editor.on('PastePreProcess', function (e) {
@ -1338,7 +1720,7 @@ var paste = (function () {
}); });
} }
function removeExplorerBrElementsAfterBlocks(editor, html) { function removeExplorerBrElementsAfterBlocks(editor, html) {
if (!$_dfatuiivjjgwecu8.isWordContent(html)) { if (!WordFilter.isWordContent(html)) {
return html; return html;
} }
var blockElements = []; var blockElements = [];
@ -1346,11 +1728,11 @@ var paste = (function () {
blockElements.push(blockName); blockElements.push(blockName);
}); });
var explorerBlocksRegExp = new RegExp('(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*', 'g'); var explorerBlocksRegExp = new RegExp('(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*', 'g');
html = $_4bi2o9j0jjgwecui.filter(html, [[ html = Utils.filter(html, [[
explorerBlocksRegExp, explorerBlocksRegExp,
'$1' '$1'
]]); ]]);
html = $_4bi2o9j0jjgwecui.filter(html, [ html = Utils.filter(html, [
[ [
/<br><br>/g, /<br><br>/g,
'<BR><BR>' '<BR><BR>'
@ -1370,9 +1752,9 @@ var paste = (function () {
if (isWordHtml || internal) { if (isWordHtml || internal) {
return content; return content;
} }
var webKitStylesSetting = $_xr8b0ikjjgwectl.getWebkitStyles(editor); var webKitStylesSetting = Settings.getWebkitStyles(editor);
var webKitStyles; var webKitStyles;
if ($_xr8b0ikjjgwectl.shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') { if (Settings.shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
return content; return content;
} }
if (webKitStylesSetting) { if (webKitStylesSetting) {
@ -1424,28 +1806,7 @@ var paste = (function () {
addPostProcessFilter(editor, removeUnderlineAndFontInAnchor); addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
} }
}; };
var $_36tmgyj7jjgwecvc = { setup: setup$2 }; var Quirks = { setup: setup$2 };
var curry = function (f) {
var x = [];
for (var _i = 1; _i < arguments.length; _i++) {
x[_i - 1] = arguments[_i];
}
var args = new Array(arguments.length - 1);
for (var i = 1; i < arguments.length; i++)
args[i - 1] = arguments[i];
return function () {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
}
var newArgs = new Array(arguments.length);
for (var j = 0; j < newArgs.length; j++)
newArgs[j] = arguments[j];
var all = args.concat(newArgs);
return f.apply(null, all);
};
};
var stateChange = function (editor, clipboard, e) { var stateChange = function (editor, clipboard, e) {
var ctrl = e.control; var ctrl = e.control;
@ -1471,21 +1832,21 @@ var paste = (function () {
onPostRender: postRender onPostRender: postRender
}); });
}; };
var $_g9yhwdj8jjgwecvf = { register: register$2 }; var Buttons = { register: register$2 };
global.add('paste', function (editor) { global.add('paste', function (editor) {
if ($_15bf6siejjgwect1.hasProPlugin(editor) === false) { if (DetectProPlugin.hasProPlugin(editor) === false) {
var userIsInformedState = Cell(false); var userIsInformedState = Cell(false);
var draggingInternallyState = Cell(false); var draggingInternallyState = Cell(false);
var pasteFormat = Cell($_xr8b0ikjjgwectl.isPasteAsTextEnabled(editor) ? 'text' : 'html'); var pasteFormat = Cell(Settings.isPasteAsTextEnabled(editor) ? 'text' : 'html');
var clipboard = Clipboard(editor, pasteFormat); var clipboard = Clipboard(editor, pasteFormat);
var quirks = $_36tmgyj7jjgwecvc.setup(editor); var quirks = Quirks.setup(editor);
$_g9yhwdj8jjgwecvf.register(editor, clipboard); Buttons.register(editor, clipboard);
$_fldd1mihjjgwecth.register(editor, clipboard, userIsInformedState); Commands.register(editor, clipboard, userIsInformedState);
$_c5bihmj6jjgwecva.setup(editor); PrePostProcess.setup(editor);
$_32blojj3jjgwecv4.register(editor); CutCopy.register(editor);
$_b4etj0j4jjgwecv7.setup(editor, clipboard, draggingInternallyState); DragDrop.setup(editor, clipboard, draggingInternallyState);
return $_6gtliyigjjgwecte.get(clipboard, quirks); return Api.get(clipboard, quirks);
} }
}); });
function Plugin () { function Plugin () {

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ var tabfocus = (function () {
var getTabFocus = function (editor) { var getTabFocus = function (editor) {
return editor.getParam('tab_focus', getTabFocusElements(editor)); return editor.getParam('tab_focus', getTabFocusElements(editor));
}; };
var $_8rita4kwjjgwed4m = { getTabFocus: getTabFocus }; var Settings = { getTabFocus: getTabFocus };
var DOM = global$1.DOM; var DOM = global$1.DOM;
var tabCancel = function (e) { var tabCancel = function (e) {
@ -65,7 +65,7 @@ var tabfocus = (function () {
} }
return null; return null;
} }
v = global$5.explode($_8rita4kwjjgwed4m.getTabFocus(editor)); v = global$5.explode(Settings.getTabFocus(editor));
if (v.length === 1) { if (v.length === 1) {
v[1] = v[0]; v[1] = v[0];
v[0] = ':prev'; v[0] = ':prev';
@ -110,10 +110,10 @@ var tabfocus = (function () {
} }
}); });
}; };
var $_6zogdykpjjgwed4h = { setup: setup }; var Keyboard = { setup: setup };
global.add('tabfocus', function (editor) { global.add('tabfocus', function (editor) {
$_6zogdykpjjgwed4h.setup(editor); Keyboard.setup(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -9,7 +9,7 @@ var textcolor = (function () {
editor.dom.getParents(editor.selection.getStart(), function (elm) { editor.dom.getParents(editor.selection.getStart(), function (elm) {
var value; var value;
if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) { if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) {
color = value; color = color ? color : value;
} }
}); });
return color; return color;
@ -39,7 +39,7 @@ var textcolor = (function () {
editor.nodeChanged(); editor.nodeChanged();
}); });
}; };
var $_b0p88yrijjgwefd2 = { var TextColor = {
getCurrentColor: getCurrentColor, getCurrentColor: getCurrentColor,
mapColors: mapColors, mapColors: mapColors,
applyFormat: applyFormat, applyFormat: applyFormat,
@ -48,13 +48,13 @@ var textcolor = (function () {
var register = function (editor) { var register = function (editor) {
editor.addCommand('mceApplyTextcolor', function (format, value) { editor.addCommand('mceApplyTextcolor', function (format, value) {
$_b0p88yrijjgwefd2.applyFormat(editor, format, value); TextColor.applyFormat(editor, format, value);
}); });
editor.addCommand('mceRemoveTextcolor', function (format) { editor.addCommand('mceRemoveTextcolor', function (format) {
$_b0p88yrijjgwefd2.removeFormat(editor, format); TextColor.removeFormat(editor, format);
}); });
}; };
var $_g2o2pirhjjgwefd1 = { register: register }; var Commands = { register: register };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
@ -173,7 +173,7 @@ var textcolor = (function () {
var hasColorPicker = function (editor) { var hasColorPicker = function (editor) {
return typeof getColorPickerCallback(editor) === 'function'; return typeof getColorPickerCallback(editor) === 'function';
}; };
var $_2rfqb7rmjjgwefd9 = { var Settings = {
getForeColorMap: getForeColorMap, getForeColorMap: getForeColorMap,
getBackColorMap: getBackColorMap, getBackColorMap: getBackColorMap,
getForeColorRows: getForeColorRows, getForeColorRows: getForeColorRows,
@ -193,7 +193,7 @@ var textcolor = (function () {
var isNoColor = color === 'transparent'; var isNoColor = color === 'transparent';
return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>'; return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>';
}; };
colors = $_b0p88yrijjgwefd2.mapColors(colorMap); colors = TextColor.mapColors(colorMap);
colors.push({ colors.push({
text: global$3.translate('No color'), text: global$3.translate('No color'),
color: 'transparent' color: 'transparent'
@ -224,7 +224,7 @@ var textcolor = (function () {
html += '</tbody></table>'; html += '</tbody></table>';
return html; return html;
}; };
var $_fihh7qrnjjgwefdb = { getHtml: getHtml }; var ColorPickerHtml = { getHtml: getHtml };
var setDivColor = function setDivColor(div, value) { var setDivColor = function setDivColor(div, value) {
div.style.background = value; div.style.background = value;
@ -244,7 +244,7 @@ var textcolor = (function () {
return function (e) { return function (e) {
var buttonCtrl = this.parent(); var buttonCtrl = this.parent();
var value; var value;
var currentColor = $_b0p88yrijjgwefd2.getCurrentColor(editor, buttonCtrl.settings.format); var currentColor = TextColor.getCurrentColor(editor, buttonCtrl.settings.format);
var selectColor = function (value) { var selectColor = function (value) {
editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value); editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
buttonCtrl.hidePanel(); buttonCtrl.hidePanel();
@ -257,7 +257,7 @@ var textcolor = (function () {
}; };
if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) { if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) {
buttonCtrl.hidePanel(); buttonCtrl.hidePanel();
var colorPickerCallback = $_2rfqb7rmjjgwefd9.getColorPickerCallback(editor); var colorPickerCallback = Settings.getColorPickerCallback(editor);
colorPickerCallback.call(editor, function (value) { colorPickerCallback.call(editor, function (value) {
var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0]; var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
var customColorCells, div, i; var customColorCells, div, i;
@ -298,11 +298,11 @@ var textcolor = (function () {
}; };
var renderColorPicker = function (editor, foreColor) { var renderColorPicker = function (editor, foreColor) {
return function () { return function () {
var cols = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorCols(editor) : $_2rfqb7rmjjgwefd9.getBackColorCols(editor); var cols = foreColor ? Settings.getForeColorCols(editor) : Settings.getBackColorCols(editor);
var rows = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorRows(editor) : $_2rfqb7rmjjgwefd9.getBackColorRows(editor); var rows = foreColor ? Settings.getForeColorRows(editor) : Settings.getBackColorRows(editor);
var colorMap = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorMap(editor) : $_2rfqb7rmjjgwefd9.getBackColorMap(editor); var colorMap = foreColor ? Settings.getForeColorMap(editor) : Settings.getBackColorMap(editor);
var hasColorPicker = $_2rfqb7rmjjgwefd9.hasColorPicker(editor); var hasColorPicker = Settings.hasColorPicker(editor);
return $_fihh7qrnjjgwefdb.getHtml(cols, rows, colorMap, hasColorPicker); return ColorPickerHtml.getHtml(cols, rows, colorMap, hasColorPicker);
}; };
}; };
var register$1 = function (editor) { var register$1 = function (editor) {
@ -314,7 +314,7 @@ var textcolor = (function () {
role: 'application', role: 'application',
ariaRemember: true, ariaRemember: true,
html: renderColorPicker(editor, true), html: renderColorPicker(editor, true),
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.getForeColorCols(editor)) onclick: onPanelClick(editor, Settings.getForeColorCols(editor))
}, },
onclick: onButtonClick(editor) onclick: onButtonClick(editor)
}); });
@ -326,16 +326,16 @@ var textcolor = (function () {
role: 'application', role: 'application',
ariaRemember: true, ariaRemember: true,
html: renderColorPicker(editor, false), html: renderColorPicker(editor, false),
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.getBackColorCols(editor)) onclick: onPanelClick(editor, Settings.getBackColorCols(editor))
}, },
onclick: onButtonClick(editor) onclick: onButtonClick(editor)
}); });
}; };
var $_8npvswrjjjgwefd5 = { register: register$1 }; var Buttons = { register: register$1 };
global.add('textcolor', function (editor) { global.add('textcolor', function (editor) {
$_g2o2pirhjjgwefd1.register(editor); Commands.register(editor);
$_8npvswrjjjgwefd5.register(editor); Buttons.register(editor);
}); });
function Plugin () { function Plugin () {
} }

View File

@ -1 +1 @@
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"&#215;":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}(); !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"&#215;":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();

View File

@ -87,6 +87,7 @@
<glyph unicode="&#xe906;" glyph-name="reload" d="M889.68 793.68c-93.608 102.216-228.154 166.32-377.68 166.32-282.77 0-512-229.23-512-512h96c0 229.75 186.25 416 416 416 123.020 0 233.542-53.418 309.696-138.306l-149.696-149.694h352v352l-134.32-134.32zM928 448c0-229.75-186.25-416-416-416-123.020 0-233.542 53.418-309.694 138.306l149.694 149.694h-352v-352l134.32 134.32c93.608-102.216 228.154-166.32 377.68-166.32 282.77 0 512 229.23 512 512h-96z" /> <glyph unicode="&#xe906;" glyph-name="reload" d="M889.68 793.68c-93.608 102.216-228.154 166.32-377.68 166.32-282.77 0-512-229.23-512-512h96c0 229.75 186.25 416 416 416 123.020 0 233.542-53.418 309.696-138.306l-149.696-149.694h352v352l-134.32-134.32zM928 448c0-229.75-186.25-416-416-416-123.020 0-233.542 53.418-309.694 138.306l149.694 149.694h-352v-352l134.32 134.32c93.608-102.216 228.154-166.32 377.68-166.32 282.77 0 512 229.23 512 512h-96z" />
<glyph unicode="&#xe907;" glyph-name="translate" d="M553.6 304l-118.4 118.4c80 89.6 137.6 195.2 172.8 304h137.6v92.8h-326.4v92.8h-92.8v-92.8h-326.4v-92.8h518.4c-32-89.6-80-176-147.2-249.6-44.8 48-80 99.2-108.8 156.8h-92.8c35.2-76.8 80-147.2 137.6-211.2l-236.8-233.6 67.2-67.2 233.6 233.6 144-144c3.2 0 38.4 92.8 38.4 92.8zM816 540.8h-92.8l-208-560h92.8l51.2 140.8h220.8l51.2-140.8h92.8l-208 560zM691.2 214.4l76.8 201.6 76.8-201.6h-153.6z" /> <glyph unicode="&#xe907;" glyph-name="translate" d="M553.6 304l-118.4 118.4c80 89.6 137.6 195.2 172.8 304h137.6v92.8h-326.4v92.8h-92.8v-92.8h-326.4v-92.8h518.4c-32-89.6-80-176-147.2-249.6-44.8 48-80 99.2-108.8 156.8h-92.8c35.2-76.8 80-147.2 137.6-211.2l-236.8-233.6 67.2-67.2 233.6 233.6 144-144c3.2 0 38.4 92.8 38.4 92.8zM816 540.8h-92.8l-208-560h92.8l51.2 140.8h220.8l51.2-140.8h92.8l-208 560zM691.2 214.4l76.8 201.6 76.8-201.6h-153.6z" />
<glyph unicode="&#xe908;" glyph-name="drag" d="M576 896h128v-128h-128v128zM576 640h128v-128h-128v128zM320 640h128v-128h-128v128zM576 384h128v-128h-128v128zM320 384h128v-128h-128v128zM320 128h128v-128h-128v128zM576 128h128v-128h-128v128zM320 896h128v-128h-128v128z" /> <glyph unicode="&#xe908;" glyph-name="drag" d="M576 896h128v-128h-128v128zM576 640h128v-128h-128v128zM320 640h128v-128h-128v128zM576 384h128v-128h-128v128zM320 384h128v-128h-128v128zM320 128h128v-128h-128v128zM576 128h128v-128h-128v128zM320 896h128v-128h-128v128z" />
<glyph unicode="&#xe909;" glyph-name="format-painter" d="M768 746.667v42.667c0 23.467-19.2 42.667-42.667 42.667h-512c-23.467 0-42.667-19.2-42.667-42.667v-170.667c0-23.467 19.2-42.667 42.667-42.667h512c23.467 0 42.667 19.2 42.667 42.667v42.667h42.667v-170.667h-426.667v-384c0-23.467 19.2-42.667 42.667-42.667h85.333c23.467 0 42.667 19.2 42.667 42.667v298.667h341.333v341.333h-128z" />
<glyph unicode="&#xe90b;" glyph-name="home" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" /> <glyph unicode="&#xe90b;" glyph-name="home" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" />
<glyph unicode="&#xe911;" glyph-name="books" d="M576.234 670.73l242.712 81.432 203.584-606.784-242.712-81.432zM0 64h256v704h-256v-704zM64 640h128v-64h-128v64zM320 64h256v704h-256v-704zM384 640h128v-64h-128v64z" /> <glyph unicode="&#xe911;" glyph-name="books" d="M576.234 670.73l242.712 81.432 203.584-606.784-242.712-81.432zM0 64h256v704h-256v-704zM64 640h128v-64h-128v64zM320 64h256v704h-256v-704zM384 640h128v-64h-128v64z" />
<glyph unicode="&#xe914;" glyph-name="upload" d="M839.432 760.57c27.492-27.492 50.554-78.672 55.552-120.57h-318.984v318.984c41.898-4.998 93.076-28.060 120.568-55.552l142.864-142.862zM512 576v384h-368c-44 0-80-36-80-80v-864c0-44 36-80 80-80h672c44 0 80 36 80 80v560h-384zM576 192v-192h-192v192h-160l256 256 256-256h-160z" /> <glyph unicode="&#xe914;" glyph-name="upload" d="M839.432 760.57c27.492-27.492 50.554-78.672 55.552-120.57h-318.984v318.984c41.898-4.998 93.076-28.060 120.568-55.552l142.864-142.862zM512 576v384h-368c-44 0-80-36-80-80v-864c0-44 36-80 80-80h672c44 0 80 36 80 80v560h-384zM576 192v-192h-192v192h-160l256 256 256-256h-160z" />

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.1-beta2-44712'; $wp_version = '5.1-beta2-44713';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
@ -27,7 +27,7 @@ $wp_db_version = 44467;
* *
* @global string $tinymce_version * @global string $tinymce_version
*/ */
$tinymce_version = '4800-20180716'; $tinymce_version = '4920-20181217';
/** /**
* Holds the required PHP version * Holds the required PHP version