mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
Fixes #44134. Built from https://develop.svn.wordpress.org/trunk@43447 git-svn-id: http://core.svn.wordpress.org/trunk@43274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
691dc59ad3
commit
26ca877782
@ -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 $_j6jbo95jfuw8onk = { fireInsertCustomChar: fireInsertCustomChar };
|
var $_ce2ncy9qjjgwebhk = { fireInsertCustomChar: fireInsertCustomChar };
|
||||||
|
|
||||||
var insertChar = function (editor, chr) {
|
var insertChar = function (editor, chr) {
|
||||||
var evtChr = $_j6jbo95jfuw8onk.fireInsertCustomChar(editor, chr).chr;
|
var evtChr = $_ce2ncy9qjjgwebhk.fireInsertCustomChar(editor, chr).chr;
|
||||||
editor.execCommand('mceInsertContent', false, evtChr);
|
editor.execCommand('mceInsertContent', false, evtChr);
|
||||||
};
|
};
|
||||||
var $_apbezv94jfuw8onj = { insertChar: insertChar };
|
var $_el68bd9pjjgwebhj = { 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 $_ae555o98jfuw8onx = {
|
var $_5e4nos9tjjgwebhr = {
|
||||||
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 = $_ae555o98jfuw8onx.getCharMap(editor);
|
var userCharMap = $_5e4nos9tjjgwebhr.getCharMap(editor);
|
||||||
if (userCharMap) {
|
if (userCharMap) {
|
||||||
charmap = getCharsFromSetting(userCharMap);
|
charmap = getCharsFromSetting(userCharMap);
|
||||||
}
|
}
|
||||||
var userCharMapAppend = $_ae555o98jfuw8onx.getCharMapAppend(editor);
|
var userCharMapAppend = $_5e4nos9tjjgwebhr.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 $_a0v8qq96jfuw8onl = { getCharMap: getCharMap$1 };
|
var $_dc8shd9rjjgwebhl = { getCharMap: getCharMap$1 };
|
||||||
|
|
||||||
var get = function (editor) {
|
var get = function (editor) {
|
||||||
var getCharMap = function () {
|
var getCharMap = function () {
|
||||||
return $_a0v8qq96jfuw8onl.getCharMap(editor);
|
return $_dc8shd9rjjgwebhl.getCharMap(editor);
|
||||||
};
|
};
|
||||||
var insertChar = function (chr) {
|
var insertChar = function (chr) {
|
||||||
$_apbezv94jfuw8onj.insertChar(editor, chr);
|
$_el68bd9pjjgwebhj.insertChar(editor, chr);
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
getCharMap: getCharMap,
|
getCharMap: getCharMap,
|
||||||
insertChar: insertChar
|
insertChar: insertChar
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_bi5zpv93jfuw8oni = { get: get };
|
var $_gbufu29ojjgwebhf = { 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 $_gbsfov9bjfuw8oo2 = { getHtml: getHtml };
|
var $_6avwgq9wjjgwebi2 = { 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: $_gbsfov9bjfuw8oo2.getHtml($_a0v8qq96jfuw8onl.getCharMap(editor)),
|
html: $_6avwgq9wjjgwebi2.getHtml($_dc8shd9rjjgwebhl.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)) {
|
||||||
$_apbezv94jfuw8onj.insertChar(editor, String.fromCharCode(charCode));
|
$_el68bd9pjjgwebhj.insertChar(editor, String.fromCharCode(charCode));
|
||||||
}
|
}
|
||||||
if (!e.ctrlKey) {
|
if (!e.ctrlKey) {
|
||||||
win.close();
|
win.close();
|
||||||
@ -1237,14 +1237,14 @@ var charmap = (function () {
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_apxwbz9ajfuw8oo0 = { open: open };
|
var $_3eaa3c9vjjgwebht = { open: open };
|
||||||
|
|
||||||
var register = function (editor) {
|
var register = function (editor) {
|
||||||
editor.addCommand('mceShowCharmap', function () {
|
editor.addCommand('mceShowCharmap', function () {
|
||||||
$_apxwbz9ajfuw8oo0.open(editor);
|
$_3eaa3c9vjjgwebht.open(editor);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_21ao9599jfuw8ony = { register: register };
|
var $_b5cdu19ujjgwebhs = { 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 $_9qh4i09cjfuw8oo4 = { register: register$1 };
|
var $_19iu2m9xjjgwebi3 = { register: register$1 };
|
||||||
|
|
||||||
global.add('charmap', function (editor) {
|
global.add('charmap', function (editor) {
|
||||||
$_21ao9599jfuw8ony.register(editor);
|
$_b5cdu19ujjgwebhs.register(editor);
|
||||||
$_9qh4i09cjfuw8oo4.register(editor);
|
$_19iu2m9xjjgwebi3.register(editor);
|
||||||
return $_bi5zpv93jfuw8oni.get(editor);
|
return $_gbufu29ojjgwebhf.get(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -108,12 +108,12 @@ var colorpicker = (function () {
|
|||||||
});
|
});
|
||||||
setColor(win, value);
|
setColor(win, value);
|
||||||
};
|
};
|
||||||
var $_3y7nz6a1jfuw8osh = { open: open };
|
var $_2gqaphanjjgwebmu = { 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) {
|
||||||
$_3y7nz6a1jfuw8osh.open(editor, callback, value);
|
$_2gqaphanjjgwebmu.open(editor, callback, value);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -20,17 +20,17 @@ var directionality = (function () {
|
|||||||
editor.nodeChanged();
|
editor.nodeChanged();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_3zbk8naijfuw8otk = { setDir: setDir };
|
var $_fd54yfb4jjgwebo5 = { setDir: setDir };
|
||||||
|
|
||||||
var register = function (editor) {
|
var register = function (editor) {
|
||||||
editor.addCommand('mceDirectionLTR', function () {
|
editor.addCommand('mceDirectionLTR', function () {
|
||||||
$_3zbk8naijfuw8otk.setDir(editor, 'ltr');
|
$_fd54yfb4jjgwebo5.setDir(editor, 'ltr');
|
||||||
});
|
});
|
||||||
editor.addCommand('mceDirectionRTL', function () {
|
editor.addCommand('mceDirectionRTL', function () {
|
||||||
$_3zbk8naijfuw8otk.setDir(editor, 'rtl');
|
$_fd54yfb4jjgwebo5.setDir(editor, 'rtl');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_eltqhvahjfuw8otj = { register: register };
|
var $_cpb3fob3jjgwebo4 = { 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 $_g7lfqakjfuw8otn = { register: register$1 };
|
var $_8ch9fzb6jjgwebo7 = { register: register$1 };
|
||||||
|
|
||||||
global.add('directionality', function (editor) {
|
global.add('directionality', function (editor) {
|
||||||
$_eltqhvahjfuw8otj.register(editor);
|
$_cpb3fob3jjgwebo4.register(editor);
|
||||||
$_g7lfqakjfuw8otn.register(editor);
|
$_8ch9fzb6jjgwebo7.register(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,14 @@ var fullscreen = (function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_2d5qbdbsjfuw8ozh = { get: get };
|
var $_6qfcwucejjgwebu0 = { 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 $_6m5hhtbwjfuw8ozm = { fireFullscreenStateChanged: fireFullscreenStateChanged };
|
var $_en5ltwcijjgwebu6 = { 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);
|
||||||
$_6m5hhtbwjfuw8ozm.fireFullscreenStateChanged(editor, true);
|
$_en5ltwcijjgwebu6.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);
|
||||||
$_6m5hhtbwjfuw8ozm.fireFullscreenStateChanged(editor, false);
|
$_en5ltwcijjgwebu6.fireFullscreenStateChanged(editor, false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_e74zxhbujfuw8ozj = { toggleFullscreen: toggleFullscreen };
|
var $_dvg07kcgjjgwebu3 = { toggleFullscreen: toggleFullscreen };
|
||||||
|
|
||||||
var register = function (editor, fullscreenState) {
|
var register = function (editor, fullscreenState) {
|
||||||
editor.addCommand('mceFullScreen', function () {
|
editor.addCommand('mceFullScreen', function () {
|
||||||
$_e74zxhbujfuw8ozj.toggleFullscreen(editor, fullscreenState);
|
$_dvg07kcgjjgwebu3.toggleFullscreen(editor, fullscreenState);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_j53v2btjfuw8ozi = { register: register };
|
var $_bebdcrcfjjgwebu1 = { 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 $_3ge8trbxjfuw8ozn = { register: register$1 };
|
var $_tne4sckjjgwebuo = { 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 $_2d5qbdbsjfuw8ozh.get(fullscreenState);
|
return $_6qfcwucejjgwebu0.get(fullscreenState);
|
||||||
}
|
}
|
||||||
$_j53v2btjfuw8ozi.register(editor, fullscreenState);
|
$_bebdcrcfjjgwebu1.register(editor, fullscreenState);
|
||||||
$_3ge8trbxjfuw8ozn.register(editor);
|
$_tne4sckjjgwebuo.register(editor);
|
||||||
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
|
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
|
||||||
return $_2d5qbdbsjfuw8ozh.get(fullscreenState);
|
return $_6qfcwucejjgwebu0.get(fullscreenState);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ var hr = (function () {
|
|||||||
editor.execCommand('mceInsertContent', false, '<hr />');
|
editor.execCommand('mceInsertContent', false, '<hr />');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_598wgdc0jfuw8p00 = { register: register };
|
var $_cqh592cnjjgwebvk = { 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 $_7oq7jyc1jfuw8p02 = { register: register$1 };
|
var $_13g834cojjgwebvl = { register: register$1 };
|
||||||
|
|
||||||
global.add('hr', function (editor) {
|
global.add('hr', function (editor) {
|
||||||
$_598wgdc0jfuw8p00.register(editor);
|
$_cqh592cnjjgwebvk.register(editor);
|
||||||
$_7oq7jyc1jfuw8p02.register(editor);
|
$_13g834cojjgwebvl.register(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -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 $_9cq6y3c6jfuw8p0n = {
|
var $_1dn8wtctjjgwebvz = {
|
||||||
hasDimensions: hasDimensions,
|
hasDimensions: hasDimensions,
|
||||||
hasAdvTab: hasAdvTab,
|
hasAdvTab: hasAdvTab,
|
||||||
getPrependUrl: getPrependUrl,
|
getPrependUrl: getPrependUrl,
|
||||||
@ -63,10 +63,10 @@ var image = (function () {
|
|||||||
getUploadCredentials: getUploadCredentials
|
getUploadCredentials: getUploadCredentials
|
||||||
};
|
};
|
||||||
|
|
||||||
var global$1 = typeof window !== 'undefined' ? window : Function('return this;')();
|
var Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
||||||
|
|
||||||
var path = function (parts, scope) {
|
var path = function (parts, scope) {
|
||||||
var o = scope !== undefined && scope !== null ? scope : global$1;
|
var o = scope !== undefined && scope !== null ? scope : Global;
|
||||||
for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i)
|
for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i)
|
||||||
o = o[parts[i]];
|
o = o[parts[i]];
|
||||||
return o;
|
return o;
|
||||||
@ -75,30 +75,9 @@ var image = (function () {
|
|||||||
var parts = p.split('.');
|
var parts = p.split('.');
|
||||||
return path(parts, scope);
|
return path(parts, scope);
|
||||||
};
|
};
|
||||||
var step = function (o, part) {
|
|
||||||
if (o[part] === undefined || o[part] === null)
|
|
||||||
o[part] = {};
|
|
||||||
return o[part];
|
|
||||||
};
|
|
||||||
var forge = function (parts, target) {
|
|
||||||
var o = target !== undefined ? target : global$1;
|
|
||||||
for (var i = 0; i < parts.length; ++i)
|
|
||||||
o = step(o, parts[i]);
|
|
||||||
return o;
|
|
||||||
};
|
|
||||||
var namespace = function (name, target) {
|
|
||||||
var parts = name.split('.');
|
|
||||||
return forge(parts, target);
|
|
||||||
};
|
|
||||||
var $_5mb36jcajfuw8p19 = {
|
|
||||||
path: path,
|
|
||||||
resolve: resolve,
|
|
||||||
forge: forge,
|
|
||||||
namespace: namespace
|
|
||||||
};
|
|
||||||
|
|
||||||
var unsafe = function (name, scope) {
|
var unsafe = function (name, scope) {
|
||||||
return $_5mb36jcajfuw8p19.resolve(name, scope);
|
return resolve(name, scope);
|
||||||
};
|
};
|
||||||
var getOrDie = function (name, scope) {
|
var getOrDie = function (name, scope) {
|
||||||
var actual = unsafe(name, scope);
|
var actual = unsafe(name, scope);
|
||||||
@ -106,18 +85,18 @@ var image = (function () {
|
|||||||
throw name + ' not available on this browser';
|
throw name + ' not available on this browser';
|
||||||
return actual;
|
return actual;
|
||||||
};
|
};
|
||||||
var $_ba69mec9jfuw8p15 = { getOrDie: getOrDie };
|
var $_oab1bcwjjgwebwl = { getOrDie: getOrDie };
|
||||||
|
|
||||||
function FileReader () {
|
function FileReader () {
|
||||||
var f = $_ba69mec9jfuw8p15.getOrDie('FileReader');
|
var f = $_oab1bcwjjgwebwl.getOrDie('FileReader');
|
||||||
return new f();
|
return new f();
|
||||||
}
|
}
|
||||||
|
|
||||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
||||||
|
|
||||||
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||||
|
|
||||||
var global$4 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
||||||
|
|
||||||
var parseIntAndGetMax = function (val1, val2) {
|
var parseIntAndGetMax = function (val1, val2) {
|
||||||
return Math.max(parseInt(val1, 10), parseInt(val2, 10));
|
return Math.max(parseInt(val1, 10), parseInt(val2, 10));
|
||||||
@ -152,7 +131,7 @@ var image = (function () {
|
|||||||
var buildListItems = function (inputList, itemCallback, startItems) {
|
var buildListItems = function (inputList, itemCallback, startItems) {
|
||||||
function appendItems(values, output) {
|
function appendItems(values, output) {
|
||||||
output = output || [];
|
output = output || [];
|
||||||
global$3.each(values, function (item) {
|
global$2.each(values, function (item) {
|
||||||
var menuItem = { text: item.text || item.title };
|
var menuItem = { text: item.text || item.title };
|
||||||
if (item.menu) {
|
if (item.menu) {
|
||||||
menuItem.menu = appendItems(item.menu);
|
menuItem.menu = appendItems(item.menu);
|
||||||
@ -211,9 +190,9 @@ var image = (function () {
|
|||||||
return css;
|
return css;
|
||||||
};
|
};
|
||||||
var createImageList = function (editor, callback) {
|
var createImageList = function (editor, callback) {
|
||||||
var imageList = $_9cq6y3c6jfuw8p0n.getImageList(editor);
|
var imageList = $_1dn8wtctjjgwebvz.getImageList(editor);
|
||||||
if (typeof imageList === 'string') {
|
if (typeof imageList === 'string') {
|
||||||
global$4.send({
|
global$3.send({
|
||||||
url: imageList,
|
url: imageList,
|
||||||
success: function (text) {
|
success: function (text) {
|
||||||
callback(JSON.parse(text));
|
callback(JSON.parse(text));
|
||||||
@ -234,7 +213,7 @@ var image = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
imgElm.onload = function () {
|
imgElm.onload = function () {
|
||||||
if (!data.width && !data.height && $_9cq6y3c6jfuw8p0n.hasDimensions(editor)) {
|
if (!data.width && !data.height && $_1dn8wtctjjgwebvz.hasDimensions(editor)) {
|
||||||
editor.dom.setAttribs(imgElm, {
|
editor.dom.setAttribs(imgElm, {
|
||||||
width: imgElm.clientWidth,
|
width: imgElm.clientWidth,
|
||||||
height: imgElm.clientHeight
|
height: imgElm.clientHeight
|
||||||
@ -245,7 +224,7 @@ var image = (function () {
|
|||||||
imgElm.onerror = selectImage;
|
imgElm.onerror = selectImage;
|
||||||
};
|
};
|
||||||
var blobToDataUri = function (blob) {
|
var blobToDataUri = function (blob) {
|
||||||
return new global$2(function (resolve, reject) {
|
return new global$1(function (resolve, reject) {
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
reader.onload = function () {
|
reader.onload = function () {
|
||||||
resolve(reader.result);
|
resolve(reader.result);
|
||||||
@ -256,7 +235,7 @@ var image = (function () {
|
|||||||
reader.readAsDataURL(blob);
|
reader.readAsDataURL(blob);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_7v7yldc7jfuw8p0q = {
|
var $_1e8k4ncujjgwebw2 = {
|
||||||
getImageSize: getImageSize,
|
getImageSize: getImageSize,
|
||||||
buildListItems: buildListItems,
|
buildListItems: buildListItems,
|
||||||
removePixelSuffix: removePixelSuffix,
|
removePixelSuffix: removePixelSuffix,
|
||||||
@ -267,41 +246,12 @@ var image = (function () {
|
|||||||
blobToDataUri: blobToDataUri
|
blobToDataUri: blobToDataUri
|
||||||
};
|
};
|
||||||
|
|
||||||
var global$5 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||||
|
|
||||||
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 $_rbqovckjfuw8p27 = {
|
|
||||||
isString: isType('string'),
|
|
||||||
isObject: isType('object'),
|
|
||||||
isArray: isType('array'),
|
|
||||||
isNull: isType('null'),
|
|
||||||
isBoolean: isType('boolean'),
|
|
||||||
isUndefined: isType('undefined'),
|
|
||||||
isFunction: isType('function'),
|
|
||||||
isNumber: isType('number')
|
|
||||||
};
|
|
||||||
|
|
||||||
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
var shallow = function (old, nu) {
|
var shallow = function (old, nu) {
|
||||||
return nu;
|
return nu;
|
||||||
};
|
};
|
||||||
var deep = function (old, nu) {
|
|
||||||
var bothObjects = $_rbqovckjfuw8p27.isObject(old) && $_rbqovckjfuw8p27.isObject(nu);
|
|
||||||
return bothObjects ? deepMerge(old, nu) : nu;
|
|
||||||
};
|
|
||||||
var baseMerge = function (merger) {
|
var baseMerge = function (merger) {
|
||||||
return function () {
|
return function () {
|
||||||
var objects = new Array(arguments.length);
|
var objects = new Array(arguments.length);
|
||||||
@ -313,57 +263,53 @@ var image = (function () {
|
|||||||
for (var j = 0; j < objects.length; j++) {
|
for (var j = 0; j < objects.length; j++) {
|
||||||
var curObject = objects[j];
|
var curObject = objects[j];
|
||||||
for (var key in curObject)
|
for (var key in curObject)
|
||||||
if (curObject.hasOwnProperty(key)) {
|
if (hasOwnProperty.call(curObject, key)) {
|
||||||
ret[key] = merger(ret[key], curObject[key]);
|
ret[key] = merger(ret[key], curObject[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var deepMerge = baseMerge(deep);
|
|
||||||
var merge = baseMerge(shallow);
|
|
||||||
var $_ajpvnqcjjfuw8p25 = {
|
|
||||||
deepMerge: deepMerge,
|
|
||||||
merge: merge
|
|
||||||
};
|
|
||||||
|
|
||||||
var DOM = global$5.DOM;
|
var merge = baseMerge(shallow);
|
||||||
|
|
||||||
|
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 $_7v7yldc7jfuw8p0q.removePixelSuffix(image.style.marginLeft);
|
return $_1e8k4ncujjgwebw2.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 $_7v7yldc7jfuw8p0q.removePixelSuffix(image.style.marginTop);
|
return $_1e8k4ncujjgwebw2.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 $_7v7yldc7jfuw8p0q.removePixelSuffix(image.style.borderWidth);
|
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style.borderWidth);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var getAttrib = function (image, name) {
|
var getAttrib = function (image, name$$1) {
|
||||||
if (image.hasAttribute(name)) {
|
if (image.hasAttribute(name$$1)) {
|
||||||
return image.getAttribute(name);
|
return image.getAttribute(name$$1);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var getStyle = function (image, name) {
|
var getStyle = function (image, name$$1) {
|
||||||
return image.style[name] ? image.style[name] : '';
|
return image.style[name$$1] ? image.style[name$$1] : '';
|
||||||
};
|
};
|
||||||
var hasCaption = function (image) {
|
var hasCaption = function (image) {
|
||||||
return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
||||||
};
|
};
|
||||||
var setAttrib = function (image, name, value) {
|
var setAttrib = function (image, name$$1, value) {
|
||||||
image.setAttribute(name, value);
|
image.setAttribute(name$$1, value);
|
||||||
};
|
};
|
||||||
var wrapInFigure = function (image) {
|
var wrapInFigure = function (image) {
|
||||||
var figureElm = DOM.create('figure', { class: 'image' });
|
var figureElm = DOM.create('figure', { class: 'image' });
|
||||||
@ -394,35 +340,35 @@ var image = (function () {
|
|||||||
image.removeAttribute('style');
|
image.removeAttribute('style');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var setSize = function (name, normalizeCss) {
|
var setSize = function (name$$1, normalizeCss) {
|
||||||
return function (image, name, value) {
|
return function (image, name$$1, value) {
|
||||||
if (image.style[name]) {
|
if (image.style[name$$1]) {
|
||||||
image.style[name] = $_7v7yldc7jfuw8p0q.addPixelSuffix(value);
|
image.style[name$$1] = $_1e8k4ncujjgwebw2.addPixelSuffix(value);
|
||||||
normalizeStyle(image, normalizeCss);
|
normalizeStyle(image, normalizeCss);
|
||||||
} else {
|
} else {
|
||||||
setAttrib(image, name, value);
|
setAttrib(image, name$$1, value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var getSize = function (image, name) {
|
var getSize = function (image, name$$1) {
|
||||||
if (image.style[name]) {
|
if (image.style[name$$1]) {
|
||||||
return $_7v7yldc7jfuw8p0q.removePixelSuffix(image.style[name]);
|
return $_1e8k4ncujjgwebw2.removePixelSuffix(image.style[name$$1]);
|
||||||
} else {
|
} else {
|
||||||
return getAttrib(image, name);
|
return getAttrib(image, name$$1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var setHspace = function (image, value) {
|
var setHspace = function (image, value) {
|
||||||
var pxValue = $_7v7yldc7jfuw8p0q.addPixelSuffix(value);
|
var pxValue = $_1e8k4ncujjgwebw2.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 = $_7v7yldc7jfuw8p0q.addPixelSuffix(value);
|
var pxValue = $_1e8k4ncujjgwebw2.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 = $_7v7yldc7jfuw8p0q.addPixelSuffix(value);
|
var pxValue = $_1e8k4ncujjgwebw2.addPixelSuffix(value);
|
||||||
image.style.borderWidth = pxValue;
|
image.style.borderWidth = pxValue;
|
||||||
};
|
};
|
||||||
var setBorderStyle = function (image, value) {
|
var setBorderStyle = function (image, value) {
|
||||||
@ -469,7 +415,7 @@ var image = (function () {
|
|||||||
};
|
};
|
||||||
var create = function (normalizeCss, data) {
|
var create = function (normalizeCss, data) {
|
||||||
var image = document.createElement('img');
|
var image = document.createElement('img');
|
||||||
write(normalizeCss, $_ajpvnqcjjfuw8p25.merge(data, { caption: false }), image);
|
write(normalizeCss, merge(data, { caption: false }), image);
|
||||||
setAttrib(image, 'alt', data.alt);
|
setAttrib(image, 'alt', data.alt);
|
||||||
if (data.caption) {
|
if (data.caption) {
|
||||||
var figure = DOM.create('figure', { class: 'image' });
|
var figure = DOM.create('figure', { class: 'image' });
|
||||||
@ -497,13 +443,13 @@ var image = (function () {
|
|||||||
borderStyle: getStyle(image, 'borderStyle')
|
borderStyle: getStyle(image, 'borderStyle')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var updateProp = function (image, oldData, newData, name, set) {
|
var updateProp = function (image, oldData, newData, name$$1, set) {
|
||||||
if (newData[name] !== oldData[name]) {
|
if (newData[name$$1] !== oldData[name$$1]) {
|
||||||
set(image, name, newData[name]);
|
set(image, name$$1, newData[name$$1]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var normalized = function (set, normalizeCss) {
|
var normalized = function (set, normalizeCss) {
|
||||||
return function (image, name, value) {
|
return function (image, name$$1, value) {
|
||||||
set(image, value);
|
set(image, value);
|
||||||
normalizeStyle(image, normalizeCss);
|
normalizeStyle(image, normalizeCss);
|
||||||
};
|
};
|
||||||
@ -530,7 +476,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 = $_7v7yldc7jfuw8p0q.mergeMargins(css);
|
var mergedCss = $_1e8k4ncujjgwebw2.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);
|
||||||
};
|
};
|
||||||
@ -605,7 +551,7 @@ var image = (function () {
|
|||||||
editor.selection.select(image.parentNode);
|
editor.selection.select(image.parentNode);
|
||||||
} else {
|
} else {
|
||||||
editor.selection.select(image);
|
editor.selection.select(image);
|
||||||
$_7v7yldc7jfuw8p0q.waitLoadImage(editor, data, image);
|
$_1e8k4ncujjgwebw2.waitLoadImage(editor, data, image);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var insertOrUpdateImage = function (editor, data) {
|
var insertOrUpdateImage = function (editor, data) {
|
||||||
@ -625,28 +571,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 (!$_9cq6y3c6jfuw8p0n.hasAdvTab(editor)) {
|
if (!$_1dn8wtctjjgwebvz.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 = $_7v7yldc7jfuw8p0q.mergeMargins(css);
|
css = $_1e8k4ncujjgwebw2.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($_7v7yldc7jfuw8p0q.removePixelSuffix(css['margin-top']));
|
rootControl.find('#vspace').value($_1e8k4ncujjgwebw2.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($_7v7yldc7jfuw8p0q.removePixelSuffix(css['margin-right']));
|
rootControl.find('#hspace').value($_1e8k4ncujjgwebw2.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($_7v7yldc7jfuw8p0q.removePixelSuffix(css['border-width']));
|
rootControl.find('#border').value($_1e8k4ncujjgwebw2.removePixelSuffix(css['border-width']));
|
||||||
} else {
|
} else {
|
||||||
rootControl.find('#border').value('');
|
rootControl.find('#border').value('');
|
||||||
}
|
}
|
||||||
@ -662,7 +608,7 @@ var image = (function () {
|
|||||||
win.find('#style').each(function (ctrl) {
|
win.find('#style').each(function (ctrl) {
|
||||||
var value = getStyleValue(function (css) {
|
var value = getStyleValue(function (css) {
|
||||||
return normalizeCss(editor, css);
|
return normalizeCss(editor, css);
|
||||||
}, $_ajpvnqcjjfuw8p25.merge(defaultData(), win.toJSON()));
|
}, merge(defaultData(), win.toJSON()));
|
||||||
ctrl.value(value);
|
ctrl.value(value);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -765,7 +711,7 @@ var image = (function () {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_dlliegcfjfuw8p1m = { makeTab: makeTab };
|
var $_6dfy5vd3jjgwebxf = { makeTab: makeTab };
|
||||||
|
|
||||||
var doSyncSize = function (widthCtrl, heightCtrl) {
|
var doSyncSize = function (widthCtrl, heightCtrl) {
|
||||||
widthCtrl.state.set('oldVal', widthCtrl.value());
|
widthCtrl.state.set('oldVal', widthCtrl.value());
|
||||||
@ -845,7 +791,7 @@ var image = (function () {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_1ahiincmjfuw8p2c = {
|
var $_ftlz5pdajjgweby4 = {
|
||||||
createUi: createUi,
|
createUi: createUi,
|
||||||
syncSize: syncSize,
|
syncSize: syncSize,
|
||||||
updateSize: updateSize
|
updateSize: updateSize
|
||||||
@ -860,22 +806,22 @@ var image = (function () {
|
|||||||
if (imageListCtrl) {
|
if (imageListCtrl) {
|
||||||
imageListCtrl.value(editor.convertURL(control.value(), 'src'));
|
imageListCtrl.value(editor.convertURL(control.value(), 'src'));
|
||||||
}
|
}
|
||||||
global$3.each(meta, function (value, key) {
|
global$2.each(meta, function (value, key) {
|
||||||
rootControl.find('#' + key).value(value);
|
rootControl.find('#' + key).value(value);
|
||||||
});
|
});
|
||||||
if (!meta.width && !meta.height) {
|
if (!meta.width && !meta.height) {
|
||||||
srcURL = editor.convertURL(control.value(), 'src');
|
srcURL = editor.convertURL(control.value(), 'src');
|
||||||
prependURL = $_9cq6y3c6jfuw8p0n.getPrependUrl(editor);
|
prependURL = $_1dn8wtctjjgwebvz.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);
|
||||||
$_7v7yldc7jfuw8p0q.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) {
|
$_1e8k4ncujjgwebw2.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) {
|
||||||
if (data.width && data.height && $_9cq6y3c6jfuw8p0n.hasDimensions(editor)) {
|
if (data.width && data.height && $_1dn8wtctjjgwebvz.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);
|
||||||
$_1ahiincmjfuw8p2c.syncSize(rootControl);
|
$_ftlz5pdajjgweby4.syncSize(rootControl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -898,29 +844,29 @@ var image = (function () {
|
|||||||
},
|
},
|
||||||
imageListCtrl
|
imageListCtrl
|
||||||
];
|
];
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasDescription(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasDescription(editor)) {
|
||||||
generalFormItems.push({
|
generalFormItems.push({
|
||||||
name: 'alt',
|
name: 'alt',
|
||||||
type: 'textbox',
|
type: 'textbox',
|
||||||
label: 'Image description'
|
label: 'Image description'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasImageTitle(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasImageTitle(editor)) {
|
||||||
generalFormItems.push({
|
generalFormItems.push({
|
||||||
name: 'title',
|
name: 'title',
|
||||||
type: 'textbox',
|
type: 'textbox',
|
||||||
label: 'Image Title'
|
label: 'Image Title'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasDimensions(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasDimensions(editor)) {
|
||||||
generalFormItems.push($_1ahiincmjfuw8p2c.createUi());
|
generalFormItems.push($_ftlz5pdajjgweby4.createUi());
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.getClassList(editor)) {
|
if ($_1dn8wtctjjgwebvz.getClassList(editor)) {
|
||||||
generalFormItems.push({
|
generalFormItems.push({
|
||||||
name: 'class',
|
name: 'class',
|
||||||
type: 'listbox',
|
type: 'listbox',
|
||||||
label: 'Class',
|
label: 'Class',
|
||||||
values: $_7v7yldc7jfuw8p0q.buildListItems($_9cq6y3c6jfuw8p0n.getClassList(editor), function (item) {
|
values: $_1e8k4ncujjgwebw2.buildListItems($_1dn8wtctjjgwebvz.getClassList(editor), function (item) {
|
||||||
if (item.value) {
|
if (item.value) {
|
||||||
item.textStyle = function () {
|
item.textStyle = function () {
|
||||||
return editor.formatter.getCssText({
|
return editor.formatter.getCssText({
|
||||||
@ -932,7 +878,7 @@ var image = (function () {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasImageCaption(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasImageCaption(editor)) {
|
||||||
generalFormItems.push({
|
generalFormItems.push({
|
||||||
name: 'caption',
|
name: 'caption',
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
@ -948,13 +894,13 @@ var image = (function () {
|
|||||||
items: getGeneralItems(editor, imageListCtrl)
|
items: getGeneralItems(editor, imageListCtrl)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_e4gxykcljfuw8p29 = {
|
var $_78zck5d9jjgweby1 = {
|
||||||
makeTab: makeTab$1,
|
makeTab: makeTab$1,
|
||||||
getGeneralItems: getGeneralItems
|
getGeneralItems: getGeneralItems
|
||||||
};
|
};
|
||||||
|
|
||||||
var url = function () {
|
var url = function () {
|
||||||
return $_ba69mec9jfuw8p15.getOrDie('URL');
|
return $_oab1bcwjjgwebwl.getOrDie('URL');
|
||||||
};
|
};
|
||||||
var createObjectURL = function (blob) {
|
var createObjectURL = function (blob) {
|
||||||
return url().createObjectURL(blob);
|
return url().createObjectURL(blob);
|
||||||
@ -962,15 +908,15 @@ var image = (function () {
|
|||||||
var revokeObjectURL = function (u) {
|
var revokeObjectURL = function (u) {
|
||||||
url().revokeObjectURL(u);
|
url().revokeObjectURL(u);
|
||||||
};
|
};
|
||||||
var $_52xhfhcojfuw8p2i = {
|
var $_86i13edcjjgwebya = {
|
||||||
createObjectURL: createObjectURL,
|
createObjectURL: createObjectURL,
|
||||||
revokeObjectURL: revokeObjectURL
|
revokeObjectURL: revokeObjectURL
|
||||||
};
|
};
|
||||||
|
|
||||||
var global$6 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
|
var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
|
||||||
|
|
||||||
function XMLHttpRequest () {
|
function XMLHttpRequest () {
|
||||||
var f = $_ba69mec9jfuw8p15.getOrDie('XMLHttpRequest');
|
var f = $_oab1bcwjjgwebwl.getOrDie('XMLHttpRequest');
|
||||||
return new f();
|
return new f();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1012,7 +958,7 @@ var image = (function () {
|
|||||||
xhr.send(formData);
|
xhr.send(formData);
|
||||||
};
|
};
|
||||||
var uploadBlob = function (blobInfo, handler) {
|
var uploadBlob = function (blobInfo, handler) {
|
||||||
return new global$2(function (resolve, reject) {
|
return new global$1(function (resolve, reject) {
|
||||||
try {
|
try {
|
||||||
handler(blobInfo, resolve, reject, noop);
|
handler(blobInfo, resolve, reject, noop);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@ -1024,9 +970,9 @@ var image = (function () {
|
|||||||
return handler === defaultHandler;
|
return handler === defaultHandler;
|
||||||
};
|
};
|
||||||
var upload = function (blobInfo) {
|
var upload = function (blobInfo) {
|
||||||
return !settings.url && isDefaultHandler(settings.handler) ? global$2.reject('Upload url missing from the settings.') : uploadBlob(blobInfo, settings.handler);
|
return !settings.url && isDefaultHandler(settings.handler) ? global$1.reject('Upload url missing from the settings.') : uploadBlob(blobInfo, settings.handler);
|
||||||
};
|
};
|
||||||
settings = global$3.extend({
|
settings = global$2.extend({
|
||||||
credentials: false,
|
credentials: false,
|
||||||
handler: defaultHandler
|
handler: defaultHandler
|
||||||
}, settings);
|
}, settings);
|
||||||
@ -1035,23 +981,23 @@ var image = (function () {
|
|||||||
|
|
||||||
var onFileInput = function (editor) {
|
var onFileInput = function (editor) {
|
||||||
return function (evt) {
|
return function (evt) {
|
||||||
var Throbber = global$6.get('Throbber');
|
var Throbber = global$5.get('Throbber');
|
||||||
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 = $_52xhfhcojfuw8p2i.createObjectURL(file);
|
var blobUri = $_86i13edcjjgwebya.createObjectURL(file);
|
||||||
var uploader = Uploader({
|
var uploader = Uploader({
|
||||||
url: $_9cq6y3c6jfuw8p0n.getUploadUrl(editor),
|
url: $_1dn8wtctjjgwebvz.getUploadUrl(editor),
|
||||||
basePath: $_9cq6y3c6jfuw8p0n.getUploadBasePath(editor),
|
basePath: $_1dn8wtctjjgwebvz.getUploadBasePath(editor),
|
||||||
credentials: $_9cq6y3c6jfuw8p0n.getUploadCredentials(editor),
|
credentials: $_1dn8wtctjjgwebvz.getUploadCredentials(editor),
|
||||||
handler: $_9cq6y3c6jfuw8p0n.getUploadHandler(editor)
|
handler: $_1dn8wtctjjgwebvz.getUploadHandler(editor)
|
||||||
});
|
});
|
||||||
var finalize = function () {
|
var finalize = function () {
|
||||||
throbber.hide();
|
throbber.hide();
|
||||||
$_52xhfhcojfuw8p2i.revokeObjectURL(blobUri);
|
$_86i13edcjjgwebya.revokeObjectURL(blobUri);
|
||||||
};
|
};
|
||||||
throbber.show();
|
throbber.show();
|
||||||
return $_7v7yldc7jfuw8p0q.blobToDataUri(file).then(function (dataUrl) {
|
return $_1e8k4ncujjgwebw2.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,
|
||||||
@ -1111,43 +1057,8 @@ var image = (function () {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_9k5u99cnjfuw8p2f = { makeTab: makeTab$2 };
|
var $_71qd7mdbjjgweby7 = { makeTab: makeTab$2 };
|
||||||
|
|
||||||
var noop$1 = function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var noarg = function (f) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return f();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var compose = function (fa, fb) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return fa(fb.apply(null, arguments));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var constant = function (value) {
|
|
||||||
return function () {
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var identity = function (x) {
|
|
||||||
return x;
|
|
||||||
};
|
|
||||||
var tripleEquals = function (a, b) {
|
|
||||||
return a === b;
|
|
||||||
};
|
|
||||||
var curry = function (f) {
|
var curry = function (f) {
|
||||||
var x = [];
|
var x = [];
|
||||||
for (var _i = 1; _i < arguments.length; _i++) {
|
for (var _i = 1; _i < arguments.length; _i++) {
|
||||||
@ -1168,49 +1079,12 @@ var image = (function () {
|
|||||||
return f.apply(null, all);
|
return f.apply(null, all);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var not = function (f) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return !f.apply(null, arguments);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var die = function (msg) {
|
|
||||||
return function () {
|
|
||||||
throw new Error(msg);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var apply = function (f) {
|
|
||||||
return f();
|
|
||||||
};
|
|
||||||
var call = function (f) {
|
|
||||||
f();
|
|
||||||
};
|
|
||||||
var never = constant(false);
|
|
||||||
var always = constant(true);
|
|
||||||
var $_ajqvh7csjfuw8p2q = {
|
|
||||||
noop: noop$1,
|
|
||||||
noarg: noarg,
|
|
||||||
compose: compose,
|
|
||||||
constant: constant,
|
|
||||||
identity: identity,
|
|
||||||
tripleEquals: tripleEquals,
|
|
||||||
curry: curry,
|
|
||||||
not: not,
|
|
||||||
die: die,
|
|
||||||
apply: apply,
|
|
||||||
call: call,
|
|
||||||
never: never,
|
|
||||||
always: always
|
|
||||||
};
|
|
||||||
|
|
||||||
var submitForm = function (editor, evt) {
|
var submitForm = function (editor, evt) {
|
||||||
var win = evt.control.getRoot();
|
var win = evt.control.getRoot();
|
||||||
$_1ahiincmjfuw8p2c.updateSize(win);
|
$_ftlz5pdajjgweby4.updateSize(win);
|
||||||
editor.undoManager.transact(function () {
|
editor.undoManager.transact(function () {
|
||||||
var data = $_ajpvnqcjjfuw8p25.merge(readImageDataFromSelection(editor), win.toJSON());
|
var data = merge(readImageDataFromSelection(editor), win.toJSON());
|
||||||
insertOrUpdateImage(editor, data);
|
insertOrUpdateImage(editor, data);
|
||||||
});
|
});
|
||||||
editor.editorUpload.uploadImagesAuto();
|
editor.editorUpload.uploadImagesAuto();
|
||||||
@ -1224,7 +1098,7 @@ var image = (function () {
|
|||||||
type: 'listbox',
|
type: 'listbox',
|
||||||
label: 'Image list',
|
label: 'Image list',
|
||||||
name: 'image-list',
|
name: 'image-list',
|
||||||
values: $_7v7yldc7jfuw8p0q.buildListItems(imageList, function (item) {
|
values: $_1e8k4ncujjgwebw2.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',
|
||||||
@ -1243,33 +1117,33 @@ var image = (function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasAdvTab(editor) || $_9cq6y3c6jfuw8p0n.hasUploadUrl(editor) || $_9cq6y3c6jfuw8p0n.hasUploadHandler(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasAdvTab(editor) || $_1dn8wtctjjgwebvz.hasUploadUrl(editor) || $_1dn8wtctjjgwebvz.hasUploadHandler(editor)) {
|
||||||
var body = [$_e4gxykcljfuw8p29.makeTab(editor, imageListCtrl)];
|
var body = [$_78zck5d9jjgweby1.makeTab(editor, imageListCtrl)];
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasAdvTab(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasAdvTab(editor)) {
|
||||||
body.push($_dlliegcfjfuw8p1m.makeTab(editor));
|
body.push($_6dfy5vd3jjgwebxf.makeTab(editor));
|
||||||
}
|
}
|
||||||
if ($_9cq6y3c6jfuw8p0n.hasUploadUrl(editor) || $_9cq6y3c6jfuw8p0n.hasUploadHandler(editor)) {
|
if ($_1dn8wtctjjgwebvz.hasUploadUrl(editor) || $_1dn8wtctjjgwebvz.hasUploadHandler(editor)) {
|
||||||
body.push($_9k5u99cnjfuw8p2f.makeTab(editor));
|
body.push($_71qd7mdbjjgweby7.makeTab(editor));
|
||||||
}
|
}
|
||||||
win = editor.windowManager.open({
|
win = editor.windowManager.open({
|
||||||
title: 'Insert/edit image',
|
title: 'Insert/edit image',
|
||||||
data: data,
|
data: data,
|
||||||
bodyType: 'tabpanel',
|
bodyType: 'tabpanel',
|
||||||
body: body,
|
body: body,
|
||||||
onSubmit: $_ajqvh7csjfuw8p2q.curry(submitForm, editor)
|
onSubmit: curry(submitForm, editor)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
win = editor.windowManager.open({
|
win = editor.windowManager.open({
|
||||||
title: 'Insert/edit image',
|
title: 'Insert/edit image',
|
||||||
data: data,
|
data: data,
|
||||||
body: $_e4gxykcljfuw8p29.getGeneralItems(editor, imageListCtrl),
|
body: $_78zck5d9jjgweby1.getGeneralItems(editor, imageListCtrl),
|
||||||
onSubmit: $_ajqvh7csjfuw8p2q.curry(submitForm, editor)
|
onSubmit: curry(submitForm, editor)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$_1ahiincmjfuw8p2c.syncSize(win);
|
$_ftlz5pdajjgweby4.syncSize(win);
|
||||||
}
|
}
|
||||||
function open() {
|
function open() {
|
||||||
$_7v7yldc7jfuw8p0q.createImageList(editor, showDialog);
|
$_1e8k4ncujjgwebw2.createImageList(editor, showDialog);
|
||||||
}
|
}
|
||||||
return { open: open };
|
return { open: open };
|
||||||
}
|
}
|
||||||
@ -1277,7 +1151,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 $_cbuvmdc4jfuw8p0d = { register: register };
|
var $_3lypdlcrjjgwebvs = { register: register };
|
||||||
|
|
||||||
var hasImageClass = function (node) {
|
var hasImageClass = function (node) {
|
||||||
var className = node.attr('class');
|
var className = node.attr('class');
|
||||||
@ -1293,7 +1167,7 @@ var image = (function () {
|
|||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
if (hasImageClass(node)) {
|
if (hasImageClass(node)) {
|
||||||
node.attr('contenteditable', state ? 'false' : null);
|
node.attr('contenteditable', state ? 'false' : null);
|
||||||
global$3.each(node.getAll('figcaption'), toggleContentEditable);
|
global$2.each(node.getAll('figcaption'), toggleContentEditable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1304,7 +1178,7 @@ var image = (function () {
|
|||||||
editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
|
editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_191db6ctjfuw8p2t = { setup: setup };
|
var $_5op6l2dhjjgwebym = { setup: setup };
|
||||||
|
|
||||||
var register$1 = function (editor) {
|
var register$1 = function (editor) {
|
||||||
editor.addButton('image', {
|
editor.addButton('image', {
|
||||||
@ -1321,12 +1195,12 @@ var image = (function () {
|
|||||||
prependToContext: true
|
prependToContext: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_9nl4e0cujfuw8p2v = { register: register$1 };
|
var $_dm869adijjgwebyn = { register: register$1 };
|
||||||
|
|
||||||
global.add('image', function (editor) {
|
global.add('image', function (editor) {
|
||||||
$_191db6ctjfuw8p2t.setup(editor);
|
$_5op6l2dhjjgwebym.setup(editor);
|
||||||
$_9nl4e0cujfuw8p2v.register(editor);
|
$_dm869adijjgwebyn.register(editor);
|
||||||
$_cbuvmdc4jfuw8p0d.register(editor);
|
$_3lypdlcrjjgwebvs.register(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -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 $_ae1yh4f3jfuw8pj4 = {
|
var $_1b4wbxfvjjgwechi = {
|
||||||
assumeExternalTargets: assumeExternalTargets,
|
assumeExternalTargets: assumeExternalTargets,
|
||||||
hasContextToolbar: hasContextToolbar,
|
hasContextToolbar: hasContextToolbar,
|
||||||
getLinkList: getLinkList,
|
getLinkList: getLinkList,
|
||||||
@ -74,7 +74,7 @@ var link = (function () {
|
|||||||
link.dispatchEvent(evt);
|
link.dispatchEvent(evt);
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
};
|
};
|
||||||
var open = function (url) {
|
var open$$1 = function (url) {
|
||||||
if (!global$3.ie || global$3.ie > 10) {
|
if (!global$3.ie || global$3.ie > 10) {
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.target = '_blank';
|
link.target = '_blank';
|
||||||
@ -94,7 +94,7 @@ var link = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_2ksejbf4jfuw8pj6 = { open: open };
|
var $_du0gebfwjjgwechl = { 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 (!$_ae1yh4f3jfuw8pj4.hasRelList(editor.settings) && $_ae1yh4f3jfuw8pj4.allowUnsafeLinkTarget(editor.settings) === false) {
|
if (!$_1b4wbxfvjjgwechi.hasRelList(editor.settings) && $_1b4wbxfvjjgwechi.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 $_fs5xf5f7jfuw8pjf = {
|
var $_5298ug0jjgweci0 = {
|
||||||
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 = $_ae1yh4f3jfuw8pj4.getLinkList(editor.settings);
|
var linkList = $_1b4wbxfvjjgwechi.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 = $_fs5xf5f7jfuw8pjf.isOnlyTextSelected(selection.getContent());
|
onlyText = $_5298ug0jjgweci0.isOnlyTextSelected(selection.getContent());
|
||||||
anchorElm = $_fs5xf5f7jfuw8pjf.getAnchorElement(editor);
|
anchorElm = $_5298ug0jjgweci0.getAnchorElement(editor);
|
||||||
data.text = initialText = $_fs5xf5f7jfuw8pjf.getAnchorText(editor.selection, anchorElm);
|
data.text = initialText = $_5298ug0jjgweci0.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 ($_ae1yh4f3jfuw8pj4.hasDefaultLinkTarget(editor.settings)) {
|
} else if ($_1b4wbxfvjjgwechi.hasDefaultLinkTarget(editor.settings)) {
|
||||||
data.target = $_ae1yh4f3jfuw8pj4.getDefaultLinkTarget(editor.settings);
|
data.target = $_1b4wbxfvjjgwechi.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 ($_ae1yh4f3jfuw8pj4.shouldShowTargetList(editor.settings)) {
|
if ($_1b4wbxfvjjgwechi.shouldShowTargetList(editor.settings)) {
|
||||||
if ($_ae1yh4f3jfuw8pj4.getTargetList(editor.settings) === undefined) {
|
if ($_1b4wbxfvjjgwechi.getTargetList(editor.settings) === undefined) {
|
||||||
$_ae1yh4f3jfuw8pj4.setTargetList(editor, [
|
$_1b4wbxfvjjgwechi.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($_ae1yh4f3jfuw8pj4.getTargetList(editor.settings))
|
values: buildListItems($_1b4wbxfvjjgwechi.getTargetList(editor.settings))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if ($_ae1yh4f3jfuw8pj4.hasRelList(editor.settings)) {
|
if ($_1b4wbxfvjjgwechi.hasRelList(editor.settings)) {
|
||||||
relListCtrl = {
|
relListCtrl = {
|
||||||
name: 'rel',
|
name: 'rel',
|
||||||
type: 'listbox',
|
type: 'listbox',
|
||||||
label: 'Rel',
|
label: 'Rel',
|
||||||
values: buildListItems($_ae1yh4f3jfuw8pj4.getRelList(editor.settings), function (item) {
|
values: buildListItems($_1b4wbxfvjjgwechi.getRelList(editor.settings), function (item) {
|
||||||
if ($_ae1yh4f3jfuw8pj4.allowUnsafeLinkTarget(editor.settings) === false) {
|
if ($_1b4wbxfvjjgwechi.allowUnsafeLinkTarget(editor.settings) === false) {
|
||||||
item.value = $_fs5xf5f7jfuw8pjf.toggleTargetRules(item.value, data.target === '_blank');
|
item.value = $_5298ug0jjgweci0.toggleTargetRules(item.value, data.target === '_blank');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if ($_ae1yh4f3jfuw8pj4.hasLinkClassList(editor.settings)) {
|
if ($_1b4wbxfvjjgwechi.hasLinkClassList(editor.settings)) {
|
||||||
classListCtrl = {
|
classListCtrl = {
|
||||||
name: 'class',
|
name: 'class',
|
||||||
type: 'listbox',
|
type: 'listbox',
|
||||||
label: 'Class',
|
label: 'Class',
|
||||||
values: buildListItems($_ae1yh4f3jfuw8pj4.getLinkClassList(editor.settings), function (item) {
|
values: buildListItems($_1b4wbxfvjjgwechi.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 ($_ae1yh4f3jfuw8pj4.shouldShowLinkTitle(editor.settings)) {
|
if ($_1b4wbxfvjjgwechi.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 = $_ae1yh4f3jfuw8pj4.assumeExternalTargets(editor.settings);
|
var assumeExternalTargets = $_1b4wbxfvjjgwechi.assumeExternalTargets(editor.settings);
|
||||||
var insertLink = $_fs5xf5f7jfuw8pjf.link(editor, attachState);
|
var insertLink = $_5298ug0jjgweci0.link(editor, attachState);
|
||||||
var removeLink = $_fs5xf5f7jfuw8pjf.unlink(editor);
|
var removeLink = $_5298ug0jjgweci0.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 $_3kgdixf9jfuw8pjm = { open: open$1 };
|
var $_dxaplrg2jjgweci6 = { 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 {
|
||||||
$_2ksejbf4jfuw8pj6.open(a.href);
|
$_du0gebfwjjgwechl.open(a.href);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var openDialog = function (editor) {
|
var openDialog = function (editor) {
|
||||||
return function () {
|
return function () {
|
||||||
$_3kgdixf9jfuw8pjm.open(editor);
|
$_dxaplrg2jjgweci6.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 ($_ae1yh4f3jfuw8pj4.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_fs5xf5f7jfuw8pjf.isLink(elm)) {
|
if ($_1b4wbxfvjjgwechi.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_5298ug0jjgweci0.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 && !!$_fs5xf5f7jfuw8pjf.getAnchorElement(editor, e.element));
|
self.active(!editor.readonly && !!$_5298ug0jjgweci0.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 ($_fs5xf5f7jfuw8pjf.hasLinks(e.parents)) {
|
if ($_5298ug0jjgweci0.hasLinks(e.parents)) {
|
||||||
self.show();
|
self.show();
|
||||||
} else {
|
} else {
|
||||||
self.hide();
|
self.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!$_fs5xf5f7jfuw8pjf.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
if (!$_5298ug0jjgweci0.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 $_auu7ckf1jfuw8pj0 = {
|
var $_8hceq8ftjjgweche = {
|
||||||
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', $_auu7ckf1jfuw8pj0.openDialog(editor));
|
editor.addCommand('mceLink', $_8hceq8ftjjgweche.openDialog(editor));
|
||||||
};
|
};
|
||||||
var $_4bbs70f0jfuw8piz = { register: register };
|
var $_bauc80fsjjgwechc = { register: register };
|
||||||
|
|
||||||
var setup = function (editor) {
|
var setup = function (editor) {
|
||||||
editor.addShortcut('Meta+K', '', $_auu7ckf1jfuw8pj0.openDialog(editor));
|
editor.addShortcut('Meta+K', '', $_8hceq8ftjjgweche.openDialog(editor));
|
||||||
};
|
};
|
||||||
var $_7rlm6qfcjfuw8pjt = { setup: setup };
|
var $_49u4p1g5jjgwecie = { 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: $_auu7ckf1jfuw8pj0.openDialog(editor),
|
onclick: $_8hceq8ftjjgweche.openDialog(editor),
|
||||||
onpostrender: $_auu7ckf1jfuw8pj0.toggleActiveState(editor)
|
onpostrender: $_8hceq8ftjjgweche.toggleActiveState(editor)
|
||||||
});
|
});
|
||||||
editor.addButton('unlink', {
|
editor.addButton('unlink', {
|
||||||
active: false,
|
active: false,
|
||||||
icon: 'unlink',
|
icon: 'unlink',
|
||||||
tooltip: 'Remove link',
|
tooltip: 'Remove link',
|
||||||
onclick: $_fs5xf5f7jfuw8pjf.unlink(editor),
|
onclick: $_5298ug0jjgweci0.unlink(editor),
|
||||||
onpostrender: $_auu7ckf1jfuw8pj0.toggleActiveState(editor)
|
onpostrender: $_8hceq8ftjjgweche.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: $_auu7ckf1jfuw8pj0.gotoSelectedLink(editor)
|
onclick: $_8hceq8ftjjgweche.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: $_auu7ckf1jfuw8pj0.gotoSelectedLink(editor),
|
onclick: $_8hceq8ftjjgweche.gotoSelectedLink(editor),
|
||||||
onPostRender: $_auu7ckf1jfuw8pj0.toggleViewLinkState(editor),
|
onPostRender: $_8hceq8ftjjgweche.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: $_auu7ckf1jfuw8pj0.openDialog(editor),
|
onclick: $_8hceq8ftjjgweche.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: $_fs5xf5f7jfuw8pjf.unlink(editor),
|
onclick: $_5298ug0jjgweci0.unlink(editor),
|
||||||
stateSelector: 'a[href]'
|
stateSelector: 'a[href]'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var setupContextToolbars = function (editor) {
|
var setupContextToolbars = function (editor) {
|
||||||
if (editor.addContextToolbar) {
|
if (editor.addContextToolbar) {
|
||||||
editor.addContextToolbar($_auu7ckf1jfuw8pj0.leftClickedOnAHref(editor), 'openlink | link unlink');
|
editor.addContextToolbar($_8hceq8ftjjgweche.leftClickedOnAHref(editor), 'openlink | link unlink');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_dz7svyfdjfuw8pju = {
|
var $_bn93cg6jjgwecif = {
|
||||||
setupButtons: setupButtons,
|
setupButtons: setupButtons,
|
||||||
setupMenuItems: setupMenuItems,
|
setupMenuItems: setupMenuItems,
|
||||||
setupContextToolbars: setupContextToolbars
|
setupContextToolbars: setupContextToolbars
|
||||||
};
|
};
|
||||||
|
|
||||||
global.add('link', function (editor) {
|
global.add('link', function (editor) {
|
||||||
$_dz7svyfdjfuw8pju.setupButtons(editor);
|
$_bn93cg6jjgwecif.setupButtons(editor);
|
||||||
$_dz7svyfdjfuw8pju.setupMenuItems(editor);
|
$_bn93cg6jjgwecif.setupMenuItems(editor);
|
||||||
$_dz7svyfdjfuw8pju.setupContextToolbars(editor);
|
$_bn93cg6jjgwecif.setupContextToolbars(editor);
|
||||||
$_auu7ckf1jfuw8pj0.setupGotoLinks(editor);
|
$_8hceq8ftjjgweche.setupGotoLinks(editor);
|
||||||
$_4bbs70f0jfuw8piz.register(editor);
|
$_bauc80fsjjgwechc.register(editor);
|
||||||
$_7rlm6qfcjfuw8pjt.setup(editor);
|
$_49u4p1g5jjgwecie.setup(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ var lists = (function () {
|
|||||||
var isChildOfBody = function (dom, elm) {
|
var isChildOfBody = function (dom, elm) {
|
||||||
return dom.isChildOf(elm, dom.getRoot());
|
return dom.isChildOf(elm, dom.getRoot());
|
||||||
};
|
};
|
||||||
var $_fmlqy7fsjfuw8plr = {
|
var $_okk1ogljjgweckx = {
|
||||||
isTextNode: isTextNode,
|
isTextNode: isTextNode,
|
||||||
isListNode: isListNode,
|
isListNode: isListNode,
|
||||||
isListItemNode: isListItemNode,
|
isListItemNode: isListItemNode,
|
||||||
@ -79,7 +79,7 @@ var lists = (function () {
|
|||||||
|
|
||||||
var getNormalizedEndPoint = function (container, offset) {
|
var getNormalizedEndPoint = function (container, offset) {
|
||||||
var node = global$1.getNode(container, offset);
|
var node = global$1.getNode(container, offset);
|
||||||
if ($_fmlqy7fsjfuw8plr.isListItemNode(container) && $_fmlqy7fsjfuw8plr.isTextNode(node)) {
|
if ($_okk1ogljjgweckx.isListItemNode(container) && $_okk1ogljjgweckx.isTextNode(node)) {
|
||||||
var textNodeOffset = offset >= container.childNodes.length ? node.data.length : 0;
|
var textNodeOffset = offset >= container.childNodes.length ? node.data.length : 0;
|
||||||
return {
|
return {
|
||||||
container: node,
|
container: node,
|
||||||
@ -99,7 +99,7 @@ var lists = (function () {
|
|||||||
outRng.setEnd(rangeEnd.container, rangeEnd.offset);
|
outRng.setEnd(rangeEnd.container, rangeEnd.offset);
|
||||||
return outRng;
|
return outRng;
|
||||||
};
|
};
|
||||||
var $_14fh94frjfuw8plp = {
|
var $_a9cyhvgkjjgweckv = {
|
||||||
getNormalizedEndPoint: getNormalizedEndPoint,
|
getNormalizedEndPoint: getNormalizedEndPoint,
|
||||||
normalizeRange: normalizeRange
|
normalizeRange: normalizeRange
|
||||||
};
|
};
|
||||||
@ -174,9 +174,9 @@ var lists = (function () {
|
|||||||
if (bookmark.endContainer) {
|
if (bookmark.endContainer) {
|
||||||
rng.setEnd(bookmark.endContainer, bookmark.endOffset);
|
rng.setEnd(bookmark.endContainer, bookmark.endOffset);
|
||||||
}
|
}
|
||||||
return $_14fh94frjfuw8plp.normalizeRange(rng);
|
return $_a9cyhvgkjjgweckv.normalizeRange(rng);
|
||||||
};
|
};
|
||||||
var $_3byghwfqjfuw8pln = {
|
var $_2nx1i4gjjjgweckt = {
|
||||||
createBookmark: createBookmark,
|
createBookmark: createBookmark,
|
||||||
resolveBookmark: resolveBookmark
|
resolveBookmark: resolveBookmark
|
||||||
};
|
};
|
||||||
@ -189,14 +189,14 @@ var lists = (function () {
|
|||||||
sibling = parentNode.previousSibling;
|
sibling = parentNode.previousSibling;
|
||||||
if (sibling && sibling.nodeName === 'LI') {
|
if (sibling && sibling.nodeName === 'LI') {
|
||||||
sibling.appendChild(ul);
|
sibling.appendChild(ul);
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(dom, parentNode)) {
|
if ($_okk1ogljjgweckx.isEmpty(dom, parentNode)) {
|
||||||
DOM$1.remove(parentNode);
|
DOM$1.remove(parentNode);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DOM$1.setStyle(parentNode, 'listStyleType', 'none');
|
DOM$1.setStyle(parentNode, 'listStyleType', 'none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_fmlqy7fsjfuw8plr.isListNode(parentNode)) {
|
if ($_okk1ogljjgweckx.isListNode(parentNode)) {
|
||||||
sibling = parentNode.previousSibling;
|
sibling = parentNode.previousSibling;
|
||||||
if (sibling && sibling.nodeName === 'LI') {
|
if (sibling && sibling.nodeName === 'LI') {
|
||||||
sibling.appendChild(ul);
|
sibling.appendChild(ul);
|
||||||
@ -208,7 +208,7 @@ var lists = (function () {
|
|||||||
normalizeList(dom, ul);
|
normalizeList(dom, ul);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_7p90zmftjfuw8plu = {
|
var $_ekd4wzgmjjgwecl1 = {
|
||||||
normalizeList: normalizeList,
|
normalizeList: normalizeList,
|
||||||
normalizeLists: normalizeLists
|
normalizeLists: normalizeLists
|
||||||
};
|
};
|
||||||
@ -224,7 +224,7 @@ var lists = (function () {
|
|||||||
};
|
};
|
||||||
var findSubLists = function (parentList) {
|
var findSubLists = function (parentList) {
|
||||||
return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
|
return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
|
||||||
return $_fmlqy7fsjfuw8plr.isListNode(elm);
|
return $_okk1ogljjgweckx.isListNode(elm);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var getSelectedSubLists = function (editor) {
|
var getSelectedSubLists = function (editor) {
|
||||||
@ -234,7 +234,7 @@ var lists = (function () {
|
|||||||
return findSubLists(parentList);
|
return findSubLists(parentList);
|
||||||
} else {
|
} else {
|
||||||
return global$5.grep(selectedBlocks, function (elm) {
|
return global$5.grep(selectedBlocks, function (elm) {
|
||||||
return $_fmlqy7fsjfuw8plr.isListNode(elm) && parentList !== elm;
|
return $_okk1ogljjgweckx.isListNode(elm) && parentList !== elm;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -248,7 +248,7 @@ var lists = (function () {
|
|||||||
var getSelectedListItems = function (editor) {
|
var getSelectedListItems = function (editor) {
|
||||||
var selectedBlocks = editor.selection.getSelectedBlocks();
|
var selectedBlocks = editor.selection.getSelectedBlocks();
|
||||||
return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
|
return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
|
||||||
return $_fmlqy7fsjfuw8plr.isListItemNode(block);
|
return $_okk1ogljjgweckx.isListItemNode(block);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var getClosestListRootElm = function (editor, elm) {
|
var getClosestListRootElm = function (editor, elm) {
|
||||||
@ -256,7 +256,7 @@ var lists = (function () {
|
|||||||
var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
|
var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
|
||||||
return root;
|
return root;
|
||||||
};
|
};
|
||||||
var $_2bncsnfujfuw8plw = {
|
var $_3xb1cggnjjgwecl3 = {
|
||||||
getParentList: getParentList,
|
getParentList: getParentList,
|
||||||
getSelectedSubLists: getSelectedSubLists,
|
getSelectedSubLists: getSelectedSubLists,
|
||||||
getSelectedListItems: getSelectedListItems,
|
getSelectedListItems: getSelectedListItems,
|
||||||
@ -279,7 +279,7 @@ var lists = (function () {
|
|||||||
if (textBlock.tagName === editor.settings.forced_root_block) {
|
if (textBlock.tagName === editor.settings.forced_root_block) {
|
||||||
DOM$2.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
|
DOM$2.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
|
||||||
}
|
}
|
||||||
if (!$_fmlqy7fsjfuw8plr.isBlock(contentNode.firstChild, blockElements)) {
|
if (!$_okk1ogljjgweckx.isBlock(contentNode.firstChild, blockElements)) {
|
||||||
fragment.appendChild(textBlock);
|
fragment.appendChild(textBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ var lists = (function () {
|
|||||||
if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
|
if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
|
||||||
hasContentNode = true;
|
hasContentNode = true;
|
||||||
}
|
}
|
||||||
if ($_fmlqy7fsjfuw8plr.isBlock(node, blockElements)) {
|
if ($_okk1ogljjgweckx.isBlock(node, blockElements)) {
|
||||||
fragment.appendChild(node);
|
fragment.appendChild(node);
|
||||||
textBlock = null;
|
textBlock = null;
|
||||||
} else {
|
} else {
|
||||||
@ -314,7 +314,7 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
return fragment;
|
return fragment;
|
||||||
};
|
};
|
||||||
var $_3c0i4zfxjfuw8pm1 = { createNewTextBlock: createNewTextBlock };
|
var $_kbc02gqjjgwecl9 = { createNewTextBlock: createNewTextBlock };
|
||||||
|
|
||||||
var DOM$3 = global$6.DOM;
|
var DOM$3 = global$6.DOM;
|
||||||
var splitList = function (editor, ul, li, newBlock) {
|
var splitList = function (editor, ul, li, newBlock) {
|
||||||
@ -326,7 +326,7 @@ var lists = (function () {
|
|||||||
DOM$3.remove(targetNode);
|
DOM$3.remove(targetNode);
|
||||||
};
|
};
|
||||||
bookmarks = DOM$3.select('span[data-mce-type="bookmark"]', ul);
|
bookmarks = DOM$3.select('span[data-mce-type="bookmark"]', ul);
|
||||||
newBlock = newBlock || $_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li);
|
newBlock = newBlock || $_kbc02gqjjgwecl9.createNewTextBlock(editor, li);
|
||||||
tmpRng = DOM$3.createRng();
|
tmpRng = DOM$3.createRng();
|
||||||
tmpRng.setStartAfter(li);
|
tmpRng.setStartAfter(li);
|
||||||
tmpRng.setEndAfter(ul);
|
tmpRng.setEndAfter(ul);
|
||||||
@ -341,19 +341,19 @@ var lists = (function () {
|
|||||||
DOM$3.insertAfter(fragment, ul);
|
DOM$3.insertAfter(fragment, ul);
|
||||||
}
|
}
|
||||||
DOM$3.insertAfter(newBlock, ul);
|
DOM$3.insertAfter(newBlock, ul);
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(editor.dom, li.parentNode)) {
|
if ($_okk1ogljjgweckx.isEmpty(editor.dom, li.parentNode)) {
|
||||||
removeAndKeepBookmarks(li.parentNode);
|
removeAndKeepBookmarks(li.parentNode);
|
||||||
}
|
}
|
||||||
DOM$3.remove(li);
|
DOM$3.remove(li);
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(editor.dom, ul)) {
|
if ($_okk1ogljjgweckx.isEmpty(editor.dom, ul)) {
|
||||||
DOM$3.remove(ul);
|
DOM$3.remove(ul);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_dbkw03fwjfuw8plz = { splitList: splitList };
|
var $_fikiq7gpjjgwecl5 = { splitList: splitList };
|
||||||
|
|
||||||
var DOM$4 = global$6.DOM;
|
var DOM$4 = global$6.DOM;
|
||||||
var removeEmptyLi = function (dom, li) {
|
var removeEmptyLi = function (dom, li) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(dom, li)) {
|
if ($_okk1ogljjgweckx.isEmpty(dom, li)) {
|
||||||
DOM$4.remove(li);
|
DOM$4.remove(li);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -373,59 +373,59 @@ var lists = (function () {
|
|||||||
DOM$4.rename(li, 'DT');
|
DOM$4.rename(li, 'DT');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ($_fmlqy7fsjfuw8plr.isFirstChild(li) && $_fmlqy7fsjfuw8plr.isLastChild(li)) {
|
if ($_okk1ogljjgweckx.isFirstChild(li) && $_okk1ogljjgweckx.isLastChild(li)) {
|
||||||
if (ulParent.nodeName === 'LI') {
|
if (ulParent.nodeName === 'LI') {
|
||||||
DOM$4.insertAfter(li, ulParent);
|
DOM$4.insertAfter(li, ulParent);
|
||||||
removeEmptyLi(editor.dom, ulParent);
|
removeEmptyLi(editor.dom, ulParent);
|
||||||
DOM$4.remove(ul);
|
DOM$4.remove(ul);
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isListNode(ulParent)) {
|
} else if ($_okk1ogljjgweckx.isListNode(ulParent)) {
|
||||||
DOM$4.remove(ul, true);
|
DOM$4.remove(ul, true);
|
||||||
} else {
|
} else {
|
||||||
ulParent.insertBefore($_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li), ul);
|
ulParent.insertBefore($_kbc02gqjjgwecl9.createNewTextBlock(editor, li), ul);
|
||||||
DOM$4.remove(ul);
|
DOM$4.remove(ul);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isFirstChild(li)) {
|
} else if ($_okk1ogljjgweckx.isFirstChild(li)) {
|
||||||
if (ulParent.nodeName === 'LI') {
|
if (ulParent.nodeName === 'LI') {
|
||||||
DOM$4.insertAfter(li, ulParent);
|
DOM$4.insertAfter(li, ulParent);
|
||||||
li.appendChild(ul);
|
li.appendChild(ul);
|
||||||
removeEmptyLi(editor.dom, ulParent);
|
removeEmptyLi(editor.dom, ulParent);
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isListNode(ulParent)) {
|
} else if ($_okk1ogljjgweckx.isListNode(ulParent)) {
|
||||||
ulParent.insertBefore(li, ul);
|
ulParent.insertBefore(li, ul);
|
||||||
} else {
|
} else {
|
||||||
ulParent.insertBefore($_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li), ul);
|
ulParent.insertBefore($_kbc02gqjjgwecl9.createNewTextBlock(editor, li), ul);
|
||||||
DOM$4.remove(li);
|
DOM$4.remove(li);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isLastChild(li)) {
|
} else if ($_okk1ogljjgweckx.isLastChild(li)) {
|
||||||
if (ulParent.nodeName === 'LI') {
|
if (ulParent.nodeName === 'LI') {
|
||||||
DOM$4.insertAfter(li, ulParent);
|
DOM$4.insertAfter(li, ulParent);
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isListNode(ulParent)) {
|
} else if ($_okk1ogljjgweckx.isListNode(ulParent)) {
|
||||||
DOM$4.insertAfter(li, ul);
|
DOM$4.insertAfter(li, ul);
|
||||||
} else {
|
} else {
|
||||||
DOM$4.insertAfter($_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li), ul);
|
DOM$4.insertAfter($_kbc02gqjjgwecl9.createNewTextBlock(editor, li), ul);
|
||||||
DOM$4.remove(li);
|
DOM$4.remove(li);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (ulParent.nodeName === 'LI') {
|
if (ulParent.nodeName === 'LI') {
|
||||||
ul = ulParent;
|
ul = ulParent;
|
||||||
newBlock = $_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li, 'LI');
|
newBlock = $_kbc02gqjjgwecl9.createNewTextBlock(editor, li, 'LI');
|
||||||
} else if ($_fmlqy7fsjfuw8plr.isListNode(ulParent)) {
|
} else if ($_okk1ogljjgweckx.isListNode(ulParent)) {
|
||||||
newBlock = $_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li, 'LI');
|
newBlock = $_kbc02gqjjgwecl9.createNewTextBlock(editor, li, 'LI');
|
||||||
} else {
|
} else {
|
||||||
newBlock = $_3c0i4zfxjfuw8pm1.createNewTextBlock(editor, li);
|
newBlock = $_kbc02gqjjgwecl9.createNewTextBlock(editor, li);
|
||||||
}
|
}
|
||||||
$_dbkw03fwjfuw8plz.splitList(editor, ul, li, newBlock);
|
$_fikiq7gpjjgwecl5.splitList(editor, ul, li, newBlock);
|
||||||
$_7p90zmftjfuw8plu.normalizeLists(editor.dom, ul.parentNode);
|
$_ekd4wzgmjjgwecl1.normalizeLists(editor.dom, ul.parentNode);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
var outdentSelection = function (editor) {
|
var outdentSelection = function (editor) {
|
||||||
var listElements = $_2bncsnfujfuw8plw.getSelectedListItems(editor);
|
var listElements = $_3xb1cggnjjgwecl3.getSelectedListItems(editor);
|
||||||
if (listElements.length) {
|
if (listElements.length) {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(editor.selection.getRng());
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(editor.selection.getRng());
|
||||||
var i = void 0, y = void 0;
|
var i = void 0, y = void 0;
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, editor.selection.getStart(true));
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, editor.selection.getStart(true));
|
||||||
i = listElements.length;
|
i = listElements.length;
|
||||||
while (i--) {
|
while (i--) {
|
||||||
var node = listElements[i].parentNode;
|
var node = listElements[i].parentNode;
|
||||||
@ -445,12 +445,12 @@ var lists = (function () {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
editor.nodeChanged();
|
editor.nodeChanged();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_b067pwfojfuw8plj = {
|
var $_6pbactghjjgweckp = {
|
||||||
outdent: outdent,
|
outdent: outdent,
|
||||||
outdentSelection: outdentSelection
|
outdentSelection: outdentSelection
|
||||||
};
|
};
|
||||||
@ -476,8 +476,8 @@ var lists = (function () {
|
|||||||
};
|
};
|
||||||
var removeStyles = function (dom, element, styles) {
|
var removeStyles = function (dom, element, styles) {
|
||||||
global$5.each(styles, function (style) {
|
global$5.each(styles, function (style) {
|
||||||
return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
|
|
||||||
var _a;
|
var _a;
|
||||||
|
return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var getEndPointNode = function (editor, rng, start, root) {
|
var getEndPointNode = function (editor, rng, start, root) {
|
||||||
@ -487,11 +487,11 @@ var lists = (function () {
|
|||||||
if (container.nodeType === 1) {
|
if (container.nodeType === 1) {
|
||||||
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
|
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
|
||||||
}
|
}
|
||||||
if (!start && $_fmlqy7fsjfuw8plr.isBr(container.nextSibling)) {
|
if (!start && $_okk1ogljjgweckx.isBr(container.nextSibling)) {
|
||||||
container = container.nextSibling;
|
container = container.nextSibling;
|
||||||
}
|
}
|
||||||
while (container.parentNode !== root) {
|
while (container.parentNode !== root) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isTextBlock(editor, container)) {
|
if ($_okk1ogljjgweckx.isTextBlock(editor, container)) {
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
|
if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
|
||||||
@ -514,13 +514,13 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
global$5.each(siblings, function (node) {
|
global$5.each(siblings, function (node) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isTextBlock(editor, node)) {
|
if ($_okk1ogljjgweckx.isTextBlock(editor, node)) {
|
||||||
textBlocks.push(node);
|
textBlocks.push(node);
|
||||||
block = null;
|
block = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (dom.isBlock(node) || $_fmlqy7fsjfuw8plr.isBr(node)) {
|
if (dom.isBlock(node) || $_okk1ogljjgweckx.isBr(node)) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isBr(node)) {
|
if ($_okk1ogljjgweckx.isBr(node)) {
|
||||||
dom.remove(node);
|
dom.remove(node);
|
||||||
}
|
}
|
||||||
block = null;
|
block = null;
|
||||||
@ -528,7 +528,7 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
var nextSibling = node.nextSibling;
|
var nextSibling = node.nextSibling;
|
||||||
if (global$4.isBookmarkNode(node)) {
|
if (global$4.isBookmarkNode(node)) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
|
if ($_okk1ogljjgweckx.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
|
||||||
block = null;
|
block = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -555,7 +555,7 @@ var lists = (function () {
|
|||||||
var rng = editor.selection.getRng(true);
|
var rng = editor.selection.getRng(true);
|
||||||
var bookmark;
|
var bookmark;
|
||||||
var listItemName = 'LI';
|
var listItemName = 'LI';
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, editor.selection.getStart(true));
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, editor.selection.getStart(true));
|
||||||
var dom = editor.dom;
|
var dom = editor.dom;
|
||||||
if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
|
if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
|
||||||
return;
|
return;
|
||||||
@ -564,11 +564,11 @@ var lists = (function () {
|
|||||||
if (listName === 'DL') {
|
if (listName === 'DL') {
|
||||||
listItemName = 'DT';
|
listItemName = 'DT';
|
||||||
}
|
}
|
||||||
bookmark = $_3byghwfqjfuw8pln.createBookmark(rng);
|
bookmark = $_2nx1i4gjjjgweckt.createBookmark(rng);
|
||||||
global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
|
global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
|
||||||
var listBlock, sibling;
|
var listBlock, sibling;
|
||||||
sibling = block.previousSibling;
|
sibling = block.previousSibling;
|
||||||
if (sibling && $_fmlqy7fsjfuw8plr.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
|
if (sibling && $_okk1ogljjgweckx.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
|
||||||
listBlock = sibling;
|
listBlock = sibling;
|
||||||
block = dom.rename(block, listItemName);
|
block = dom.rename(block, listItemName);
|
||||||
sibling.appendChild(block);
|
sibling.appendChild(block);
|
||||||
@ -593,12 +593,12 @@ var lists = (function () {
|
|||||||
updateListWithDetails(dom, listBlock, detail);
|
updateListWithDetails(dom, listBlock, detail);
|
||||||
mergeWithAdjacentLists(editor.dom, listBlock);
|
mergeWithAdjacentLists(editor.dom, listBlock);
|
||||||
});
|
});
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
};
|
};
|
||||||
var removeList = function (editor) {
|
var removeList = function (editor) {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(editor.selection.getRng(true));
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(editor.selection.getRng(true));
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, editor.selection.getStart(true));
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, editor.selection.getStart(true));
|
||||||
var listItems = $_2bncsnfujfuw8plw.getSelectedListItems(editor);
|
var listItems = $_3xb1cggnjjgwecl3.getSelectedListItems(editor);
|
||||||
var emptyListItems = global$5.grep(listItems, function (li) {
|
var emptyListItems = global$5.grep(listItems, function (li) {
|
||||||
return editor.dom.isEmpty(li);
|
return editor.dom.isEmpty(li);
|
||||||
});
|
});
|
||||||
@ -606,8 +606,8 @@ var lists = (function () {
|
|||||||
return !editor.dom.isEmpty(li);
|
return !editor.dom.isEmpty(li);
|
||||||
});
|
});
|
||||||
global$5.each(emptyListItems, function (li) {
|
global$5.each(emptyListItems, function (li) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(editor.dom, li)) {
|
if ($_okk1ogljjgweckx.isEmpty(editor.dom, li)) {
|
||||||
$_b067pwfojfuw8plj.outdent(editor, li);
|
$_6pbactghjjgweckp.outdent(editor, li);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -617,17 +617,17 @@ var lists = (function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (node = li; node && node !== root; node = node.parentNode) {
|
for (node = li; node && node !== root; node = node.parentNode) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isListNode(node)) {
|
if ($_okk1ogljjgweckx.isListNode(node)) {
|
||||||
rootList = node;
|
rootList = node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$_dbkw03fwjfuw8plz.splitList(editor, rootList, li);
|
$_fikiq7gpjjgwecl5.splitList(editor, rootList, li);
|
||||||
$_7p90zmftjfuw8plu.normalizeLists(editor.dom, rootList.parentNode);
|
$_ekd4wzgmjjgwecl1.normalizeLists(editor.dom, rootList.parentNode);
|
||||||
});
|
});
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
};
|
};
|
||||||
var isValidLists = function (list1, list2) {
|
var isValidLists = function (list1, list2) {
|
||||||
return list1 && list2 && $_fmlqy7fsjfuw8plr.isListNode(list1) && list1.nodeName === list2.nodeName;
|
return list1 && list2 && $_okk1ogljjgweckx.isListNode(list1) && list1.nodeName === list2.nodeName;
|
||||||
};
|
};
|
||||||
var hasSameListStyle = function (dom, list1, list2) {
|
var hasSameListStyle = function (dom, list1, list2) {
|
||||||
var targetStyle = dom.getStyle(list1, 'list-style-type', true);
|
var targetStyle = dom.getStyle(list1, 'list-style-type', true);
|
||||||
@ -669,11 +669,11 @@ var lists = (function () {
|
|||||||
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
|
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
|
||||||
removeList(editor);
|
removeList(editor);
|
||||||
} else {
|
} else {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(editor.selection.getRng(true));
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(editor.selection.getRng(true));
|
||||||
global$5.each([parentList].concat(lists), function (elm) {
|
global$5.each([parentList].concat(lists), function (elm) {
|
||||||
updateList(editor.dom, elm, listName, detail);
|
updateList(editor.dom, elm, listName, detail);
|
||||||
});
|
});
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var hasListStyleDetail = function (detail) {
|
var hasListStyleDetail = function (detail) {
|
||||||
@ -687,18 +687,18 @@ var lists = (function () {
|
|||||||
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
|
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
|
||||||
removeList(editor);
|
removeList(editor);
|
||||||
} else {
|
} else {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(editor.selection.getRng(true));
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(editor.selection.getRng(true));
|
||||||
updateListWithDetails(editor.dom, parentList, detail);
|
updateListWithDetails(editor.dom, parentList, detail);
|
||||||
mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
|
mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
applyList(editor, listName, detail);
|
applyList(editor, listName, detail);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var toggleList = function (editor, listName, detail) {
|
var toggleList = function (editor, listName, detail) {
|
||||||
var parentList = $_2bncsnfujfuw8plw.getParentList(editor);
|
var parentList = $_3xb1cggnjjgwecl3.getParentList(editor);
|
||||||
var selectedSubLists = $_2bncsnfujfuw8plw.getSelectedSubLists(editor);
|
var selectedSubLists = $_3xb1cggnjjgwecl3.getSelectedSubLists(editor);
|
||||||
detail = detail ? detail : {};
|
detail = detail ? detail : {};
|
||||||
if (parentList && selectedSubLists.length > 0) {
|
if (parentList && selectedSubLists.length > 0) {
|
||||||
toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
|
toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
|
||||||
@ -706,7 +706,7 @@ var lists = (function () {
|
|||||||
toggleSingleList(editor, parentList, listName, detail);
|
toggleSingleList(editor, parentList, listName, detail);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_8qbnsrfljfuw8plb = {
|
var $_aek3i3gejjgwecki = {
|
||||||
toggleList: toggleList,
|
toggleList: toggleList,
|
||||||
removeList: removeList,
|
removeList: removeList,
|
||||||
mergeWithAdjacentLists: mergeWithAdjacentLists
|
mergeWithAdjacentLists: mergeWithAdjacentLists
|
||||||
@ -725,7 +725,7 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
walker = new global$2(node, root);
|
walker = new global$2(node, root);
|
||||||
if (isForward) {
|
if (isForward) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isBogusBr(editor.dom, node)) {
|
if ($_okk1ogljjgweckx.isBogusBr(editor.dom, node)) {
|
||||||
walker.next();
|
walker.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -743,7 +743,7 @@ var lists = (function () {
|
|||||||
};
|
};
|
||||||
var hasOnlyOneBlockChild = function (dom, elm) {
|
var hasOnlyOneBlockChild = function (dom, elm) {
|
||||||
var childNodes = elm.childNodes;
|
var childNodes = elm.childNodes;
|
||||||
return childNodes.length === 1 && !$_fmlqy7fsjfuw8plr.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
|
return childNodes.length === 1 && !$_okk1ogljjgweckx.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
|
||||||
};
|
};
|
||||||
var unwrapSingleBlockChild = function (dom, elm) {
|
var unwrapSingleBlockChild = function (dom, elm) {
|
||||||
if (hasOnlyOneBlockChild(dom, elm)) {
|
if (hasOnlyOneBlockChild(dom, elm)) {
|
||||||
@ -754,7 +754,7 @@ var lists = (function () {
|
|||||||
var node, targetElm;
|
var node, targetElm;
|
||||||
targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
|
targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
|
||||||
unwrapSingleBlockChild(dom, fromElm);
|
unwrapSingleBlockChild(dom, fromElm);
|
||||||
if (!$_fmlqy7fsjfuw8plr.isEmpty(dom, fromElm, true)) {
|
if (!$_okk1ogljjgweckx.isEmpty(dom, fromElm, true)) {
|
||||||
while (node = fromElm.firstChild) {
|
while (node = fromElm.firstChild) {
|
||||||
targetElm.appendChild(node);
|
targetElm.appendChild(node);
|
||||||
}
|
}
|
||||||
@ -763,22 +763,22 @@ var lists = (function () {
|
|||||||
var mergeLiElements = function (dom, fromElm, toElm) {
|
var mergeLiElements = function (dom, fromElm, toElm) {
|
||||||
var node, listNode;
|
var node, listNode;
|
||||||
var ul = fromElm.parentNode;
|
var ul = fromElm.parentNode;
|
||||||
if (!$_fmlqy7fsjfuw8plr.isChildOfBody(dom, fromElm) || !$_fmlqy7fsjfuw8plr.isChildOfBody(dom, toElm)) {
|
if (!$_okk1ogljjgweckx.isChildOfBody(dom, fromElm) || !$_okk1ogljjgweckx.isChildOfBody(dom, toElm)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($_fmlqy7fsjfuw8plr.isListNode(toElm.lastChild)) {
|
if ($_okk1ogljjgweckx.isListNode(toElm.lastChild)) {
|
||||||
listNode = toElm.lastChild;
|
listNode = toElm.lastChild;
|
||||||
}
|
}
|
||||||
if (ul === toElm.lastChild) {
|
if (ul === toElm.lastChild) {
|
||||||
if ($_fmlqy7fsjfuw8plr.isBr(ul.previousSibling)) {
|
if ($_okk1ogljjgweckx.isBr(ul.previousSibling)) {
|
||||||
dom.remove(ul.previousSibling);
|
dom.remove(ul.previousSibling);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node = toElm.lastChild;
|
node = toElm.lastChild;
|
||||||
if (node && $_fmlqy7fsjfuw8plr.isBr(node) && fromElm.hasChildNodes()) {
|
if (node && $_okk1ogljjgweckx.isBr(node) && fromElm.hasChildNodes()) {
|
||||||
dom.remove(node);
|
dom.remove(node);
|
||||||
}
|
}
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(dom, toElm, true)) {
|
if ($_okk1ogljjgweckx.isEmpty(dom, toElm, true)) {
|
||||||
dom.$(toElm).empty();
|
dom.$(toElm).empty();
|
||||||
}
|
}
|
||||||
moveChildren(dom, fromElm, toElm);
|
moveChildren(dom, fromElm, toElm);
|
||||||
@ -786,7 +786,7 @@ var lists = (function () {
|
|||||||
toElm.appendChild(listNode);
|
toElm.appendChild(listNode);
|
||||||
}
|
}
|
||||||
dom.remove(fromElm);
|
dom.remove(fromElm);
|
||||||
if ($_fmlqy7fsjfuw8plr.isEmpty(dom, ul) && ul !== dom.getRoot()) {
|
if ($_okk1ogljjgweckx.isEmpty(dom, ul) && ul !== dom.getRoot()) {
|
||||||
dom.remove(ul);
|
dom.remove(ul);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -800,29 +800,29 @@ var lists = (function () {
|
|||||||
if (dom.isEmpty(toLi)) {
|
if (dom.isEmpty(toLi)) {
|
||||||
mergeIntoEmptyLi(editor, fromLi, toLi);
|
mergeIntoEmptyLi(editor, fromLi, toLi);
|
||||||
} else {
|
} else {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(rng);
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(rng);
|
||||||
mergeLiElements(dom, fromLi, toLi);
|
mergeLiElements(dom, fromLi, toLi);
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var mergeBackward = function (editor, rng, fromLi, toLi) {
|
var mergeBackward = function (editor, rng, fromLi, toLi) {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(rng);
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(rng);
|
||||||
mergeLiElements(editor.dom, fromLi, toLi);
|
mergeLiElements(editor.dom, fromLi, toLi);
|
||||||
var resolvedBookmark = $_3byghwfqjfuw8pln.resolveBookmark(bookmark);
|
var resolvedBookmark = $_2nx1i4gjjjgweckt.resolveBookmark(bookmark);
|
||||||
editor.selection.setRng(resolvedBookmark);
|
editor.selection.setRng(resolvedBookmark);
|
||||||
};
|
};
|
||||||
var backspaceDeleteFromListToListCaret = function (editor, isForward) {
|
var backspaceDeleteFromListToListCaret = function (editor, isForward) {
|
||||||
var dom = editor.dom, selection = editor.selection;
|
var dom = editor.dom, selection = editor.selection;
|
||||||
var selectionStartElm = selection.getStart();
|
var selectionStartElm = selection.getStart();
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, selectionStartElm);
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, selectionStartElm);
|
||||||
var li = dom.getParent(selection.getStart(), 'LI', root);
|
var li = dom.getParent(selection.getStart(), 'LI', root);
|
||||||
var ul, rng, otherLi;
|
var ul, rng, otherLi;
|
||||||
if (li) {
|
if (li) {
|
||||||
ul = li.parentNode;
|
ul = li.parentNode;
|
||||||
if (ul === editor.getBody() && $_fmlqy7fsjfuw8plr.isEmpty(dom, ul)) {
|
if (ul === editor.getBody() && $_okk1ogljjgweckx.isEmpty(dom, ul)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
rng = $_14fh94frjfuw8plp.normalizeRange(selection.getRng(true));
|
rng = $_a9cyhvgkjjgweckv.normalizeRange(selection.getRng(true));
|
||||||
otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
|
otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
|
||||||
if (otherLi && otherLi !== li) {
|
if (otherLi && otherLi !== li) {
|
||||||
if (isForward) {
|
if (isForward) {
|
||||||
@ -832,7 +832,7 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (!otherLi) {
|
} else if (!otherLi) {
|
||||||
if (!isForward && $_8qbnsrfljfuw8plb.removeList(editor)) {
|
if (!isForward && $_aek3i3gejjgwecki.removeList(editor)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -849,15 +849,15 @@ var lists = (function () {
|
|||||||
var backspaceDeleteIntoListCaret = function (editor, isForward) {
|
var backspaceDeleteIntoListCaret = function (editor, isForward) {
|
||||||
var dom = editor.dom;
|
var dom = editor.dom;
|
||||||
var selectionStartElm = editor.selection.getStart();
|
var selectionStartElm = editor.selection.getStart();
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, selectionStartElm);
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, selectionStartElm);
|
||||||
var block = dom.getParent(selectionStartElm, dom.isBlock, root);
|
var block = dom.getParent(selectionStartElm, dom.isBlock, root);
|
||||||
if (block && dom.isEmpty(block)) {
|
if (block && dom.isEmpty(block)) {
|
||||||
var rng = $_14fh94frjfuw8plp.normalizeRange(editor.selection.getRng(true));
|
var rng = $_a9cyhvgkjjgweckv.normalizeRange(editor.selection.getRng(true));
|
||||||
var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
|
var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
|
||||||
if (otherLi_1) {
|
if (otherLi_1) {
|
||||||
editor.undoManager.transact(function () {
|
editor.undoManager.transact(function () {
|
||||||
removeBlock(dom, block, root);
|
removeBlock(dom, block, root);
|
||||||
$_8qbnsrfljfuw8plb.mergeWithAdjacentLists(dom, otherLi_1.parentNode);
|
$_aek3i3gejjgwecki.mergeWithAdjacentLists(dom, otherLi_1.parentNode);
|
||||||
editor.selection.select(otherLi_1, true);
|
editor.selection.select(otherLi_1, true);
|
||||||
editor.selection.collapse(isForward);
|
editor.selection.collapse(isForward);
|
||||||
});
|
});
|
||||||
@ -871,12 +871,12 @@ var lists = (function () {
|
|||||||
};
|
};
|
||||||
var backspaceDeleteRange = function (editor) {
|
var backspaceDeleteRange = function (editor) {
|
||||||
var selectionStartElm = editor.selection.getStart();
|
var selectionStartElm = editor.selection.getStart();
|
||||||
var root = $_2bncsnfujfuw8plw.getClosestListRootElm(editor, selectionStartElm);
|
var root = $_3xb1cggnjjgwecl3.getClosestListRootElm(editor, selectionStartElm);
|
||||||
var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
|
var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
|
||||||
if (startListParent || $_2bncsnfujfuw8plw.getSelectedListItems(editor).length > 0) {
|
if (startListParent || $_3xb1cggnjjgwecl3.getSelectedListItems(editor).length > 0) {
|
||||||
editor.undoManager.transact(function () {
|
editor.undoManager.transact(function () {
|
||||||
editor.execCommand('Delete');
|
editor.execCommand('Delete');
|
||||||
$_7p90zmftjfuw8plu.normalizeLists(editor.dom, editor.getBody());
|
$_ekd4wzgmjjgwecl1.normalizeLists(editor.dom, editor.getBody());
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -898,7 +898,7 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_6qu3vpfhjfuw8pl2 = {
|
var $_brhyezgajjgweck7 = {
|
||||||
setup: setup,
|
setup: setup,
|
||||||
backspaceDelete: backspaceDelete
|
backspaceDelete: backspaceDelete
|
||||||
};
|
};
|
||||||
@ -906,16 +906,16 @@ var lists = (function () {
|
|||||||
var get = function (editor) {
|
var get = function (editor) {
|
||||||
return {
|
return {
|
||||||
backspaceDelete: function (isForward) {
|
backspaceDelete: function (isForward) {
|
||||||
$_6qu3vpfhjfuw8pl2.backspaceDelete(editor, isForward);
|
$_brhyezgajjgweck7.backspaceDelete(editor, isForward);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_bgmttlfgjfuw8pl0 = { get: get };
|
var $_nb3yvg9jjgweck5 = { get: get };
|
||||||
|
|
||||||
var DOM$5 = global$6.DOM;
|
var DOM$5 = global$6.DOM;
|
||||||
var mergeLists = function (from, to) {
|
var mergeLists = function (from, to) {
|
||||||
var node;
|
var node;
|
||||||
if ($_fmlqy7fsjfuw8plr.isListNode(from)) {
|
if ($_okk1ogljjgweckx.isListNode(from)) {
|
||||||
while (node = from.firstChild) {
|
while (node = from.firstChild) {
|
||||||
to.appendChild(node);
|
to.appendChild(node);
|
||||||
}
|
}
|
||||||
@ -929,17 +929,17 @@ var lists = (function () {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
sibling = li.previousSibling;
|
sibling = li.previousSibling;
|
||||||
if (sibling && $_fmlqy7fsjfuw8plr.isListNode(sibling)) {
|
if (sibling && $_okk1ogljjgweckx.isListNode(sibling)) {
|
||||||
sibling.appendChild(li);
|
sibling.appendChild(li);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (sibling && sibling.nodeName === 'LI' && $_fmlqy7fsjfuw8plr.isListNode(sibling.lastChild)) {
|
if (sibling && sibling.nodeName === 'LI' && $_okk1ogljjgweckx.isListNode(sibling.lastChild)) {
|
||||||
sibling.lastChild.appendChild(li);
|
sibling.lastChild.appendChild(li);
|
||||||
mergeLists(li.lastChild, sibling.lastChild);
|
mergeLists(li.lastChild, sibling.lastChild);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
sibling = li.nextSibling;
|
sibling = li.nextSibling;
|
||||||
if (sibling && $_fmlqy7fsjfuw8plr.isListNode(sibling)) {
|
if (sibling && $_okk1ogljjgweckx.isListNode(sibling)) {
|
||||||
sibling.insertBefore(li, sibling.firstChild);
|
sibling.insertBefore(li, sibling.firstChild);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -958,20 +958,20 @@ var lists = (function () {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
var indentSelection = function (editor) {
|
var indentSelection = function (editor) {
|
||||||
var listElements = $_2bncsnfujfuw8plw.getSelectedListItems(editor);
|
var listElements = $_3xb1cggnjjgwecl3.getSelectedListItems(editor);
|
||||||
if (listElements.length) {
|
if (listElements.length) {
|
||||||
var bookmark = $_3byghwfqjfuw8pln.createBookmark(editor.selection.getRng(true));
|
var bookmark = $_2nx1i4gjjjgweckt.createBookmark(editor.selection.getRng(true));
|
||||||
for (var i = 0; i < listElements.length; i++) {
|
for (var i = 0; i < listElements.length; i++) {
|
||||||
if (!indent(listElements[i]) && i === 0) {
|
if (!indent(listElements[i]) && i === 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
editor.selection.setRng($_3byghwfqjfuw8pln.resolveBookmark(bookmark));
|
editor.selection.setRng($_2nx1i4gjjjgweckt.resolveBookmark(bookmark));
|
||||||
editor.nodeChanged();
|
editor.nodeChanged();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_4zf6mug0jfuw8pm7 = { indentSelection: indentSelection };
|
var $_3rkwagtjjgweclf = { indentSelection: indentSelection };
|
||||||
|
|
||||||
var queryListCommandState = function (editor, listName) {
|
var queryListCommandState = function (editor, listName) {
|
||||||
return function () {
|
return function () {
|
||||||
@ -984,11 +984,11 @@ var lists = (function () {
|
|||||||
var cmd = e.command.toLowerCase();
|
var cmd = e.command.toLowerCase();
|
||||||
var isHandled;
|
var isHandled;
|
||||||
if (cmd === 'indent') {
|
if (cmd === 'indent') {
|
||||||
if ($_4zf6mug0jfuw8pm7.indentSelection(editor)) {
|
if ($_3rkwagtjjgweclf.indentSelection(editor)) {
|
||||||
isHandled = true;
|
isHandled = true;
|
||||||
}
|
}
|
||||||
} else if (cmd === 'outdent') {
|
} else if (cmd === 'outdent') {
|
||||||
if ($_b067pwfojfuw8plj.outdentSelection(editor)) {
|
if ($_6pbactghjjgweckp.outdentSelection(editor)) {
|
||||||
isHandled = true;
|
isHandled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -999,24 +999,24 @@ var lists = (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
editor.addCommand('InsertUnorderedList', function (ui, detail) {
|
editor.addCommand('InsertUnorderedList', function (ui, detail) {
|
||||||
$_8qbnsrfljfuw8plb.toggleList(editor, 'UL', detail);
|
$_aek3i3gejjgwecki.toggleList(editor, 'UL', detail);
|
||||||
});
|
});
|
||||||
editor.addCommand('InsertOrderedList', function (ui, detail) {
|
editor.addCommand('InsertOrderedList', function (ui, detail) {
|
||||||
$_8qbnsrfljfuw8plb.toggleList(editor, 'OL', detail);
|
$_aek3i3gejjgwecki.toggleList(editor, 'OL', detail);
|
||||||
});
|
});
|
||||||
editor.addCommand('InsertDefinitionList', function (ui, detail) {
|
editor.addCommand('InsertDefinitionList', function (ui, detail) {
|
||||||
$_8qbnsrfljfuw8plb.toggleList(editor, 'DL', detail);
|
$_aek3i3gejjgwecki.toggleList(editor, 'DL', detail);
|
||||||
});
|
});
|
||||||
editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
|
editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
|
||||||
editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
|
editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
|
||||||
editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
|
editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
|
||||||
};
|
};
|
||||||
var $_ci56e3fzjfuw8pm5 = { register: register };
|
var $_blnfs1gsjjgwecld = { register: register };
|
||||||
|
|
||||||
var shouldIndentOnTab = function (editor) {
|
var shouldIndentOnTab = function (editor) {
|
||||||
return editor.getParam('lists_indent_on_tab', true);
|
return editor.getParam('lists_indent_on_tab', true);
|
||||||
};
|
};
|
||||||
var $_e85xmvg2jfuw8pmc = { shouldIndentOnTab: shouldIndentOnTab };
|
var $_8obsbgvjjgweclk = { shouldIndentOnTab: shouldIndentOnTab };
|
||||||
|
|
||||||
var setupTabKey = function (editor) {
|
var setupTabKey = function (editor) {
|
||||||
editor.on('keydown', function (e) {
|
editor.on('keydown', function (e) {
|
||||||
@ -1026,20 +1026,20 @@ var lists = (function () {
|
|||||||
if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
|
if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
$_b067pwfojfuw8plj.outdentSelection(editor);
|
$_6pbactghjjgweckp.outdentSelection(editor);
|
||||||
} else {
|
} else {
|
||||||
$_4zf6mug0jfuw8pm7.indentSelection(editor);
|
$_3rkwagtjjgweclf.indentSelection(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var setup$1 = function (editor) {
|
var setup$1 = function (editor) {
|
||||||
if ($_e85xmvg2jfuw8pmc.shouldIndentOnTab(editor)) {
|
if ($_8obsbgvjjgweclk.shouldIndentOnTab(editor)) {
|
||||||
setupTabKey(editor);
|
setupTabKey(editor);
|
||||||
}
|
}
|
||||||
$_6qu3vpfhjfuw8pl2.setup(editor);
|
$_brhyezgajjgweck7.setup(editor);
|
||||||
};
|
};
|
||||||
var $_1iz32kg1jfuw8pma = { setup: setup$1 };
|
var $_ees9z9gujjgwecli = { setup: setup$1 };
|
||||||
|
|
||||||
var findIndex = function (list, predicate) {
|
var findIndex = function (list, predicate) {
|
||||||
for (var index = 0; index < list.length; index++) {
|
for (var index = 0; index < list.length; index++) {
|
||||||
@ -1054,9 +1054,9 @@ var lists = (function () {
|
|||||||
return function (e) {
|
return function (e) {
|
||||||
var ctrl = e.control;
|
var ctrl = e.control;
|
||||||
editor.on('NodeChange', function (e) {
|
editor.on('NodeChange', function (e) {
|
||||||
var tableCellIndex = findIndex(e.parents, $_fmlqy7fsjfuw8plr.isTableCellNode);
|
var tableCellIndex = findIndex(e.parents, $_okk1ogljjgweckx.isTableCellNode);
|
||||||
var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
|
var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
|
||||||
var lists = global$5.grep(parents, $_fmlqy7fsjfuw8plr.isListNode);
|
var lists = global$5.grep(parents, $_okk1ogljjgweckx.isListNode);
|
||||||
ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
|
ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1065,8 +1065,8 @@ var lists = (function () {
|
|||||||
return function (e) {
|
return function (e) {
|
||||||
var ctrl = e.control;
|
var ctrl = e.control;
|
||||||
editor.on('nodechange', function () {
|
editor.on('nodechange', function () {
|
||||||
var listItemBlocks = $_2bncsnfujfuw8plw.getSelectedListItems(editor);
|
var listItemBlocks = $_3xb1cggnjjgwecl3.getSelectedListItems(editor);
|
||||||
var disable = listItemBlocks.length > 0 && $_fmlqy7fsjfuw8plr.isFirstChild(listItemBlocks[0]);
|
var disable = listItemBlocks.length > 0 && $_okk1ogljjgweckx.isFirstChild(listItemBlocks[0]);
|
||||||
ctrl.disabled(disable);
|
ctrl.disabled(disable);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1097,13 +1097,13 @@ var lists = (function () {
|
|||||||
onPostRender: indentPostRender(editor)
|
onPostRender: indentPostRender(editor)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_fizi9xg3jfuw8pmd = { register: register$1 };
|
var $_s7o0sgwjjgweclm = { register: register$1 };
|
||||||
|
|
||||||
global.add('lists', function (editor) {
|
global.add('lists', function (editor) {
|
||||||
$_1iz32kg1jfuw8pma.setup(editor);
|
$_ees9z9gujjgwecli.setup(editor);
|
||||||
$_fizi9xg3jfuw8pmd.register(editor);
|
$_s7o0sgwjjgweclm.register(editor);
|
||||||
$_ci56e3fzjfuw8pm5.register(editor);
|
$_blnfs1gsjjgwecld.register(editor);
|
||||||
return $_bgmttlfgjfuw8pl0.get(editor);
|
return $_nb3yvg9jjgweck5.get(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -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 $_bmkzfegajfuw8pol = {
|
var $_69rpmgh3jjgwecnr = {
|
||||||
getScripts: getScripts,
|
getScripts: getScripts,
|
||||||
getAudioTemplateCallback: getAudioTemplateCallback,
|
getAudioTemplateCallback: getAudioTemplateCallback,
|
||||||
getVideoTemplateCallback: getVideoTemplateCallback,
|
getVideoTemplateCallback: getVideoTemplateCallback,
|
||||||
@ -60,7 +60,7 @@ var media = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_9fg1sigejfuw8poq = { getVideoScriptMatch: getVideoScriptMatch };
|
var $_4q3fmh7jjgwecnw = { 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 $_7rx1rygfjfuw8por = {
|
var $_jbvx7h8jjgwecnx = {
|
||||||
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 = $_9fg1sigejfuw8poq.getVideoScriptMatch(prefixes, attrs.map.src);
|
var videoScript = $_4q3fmh7jjgwecnw.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: $_7rx1rygfjfuw8por.getMaxWidth(div),
|
width: $_jbvx7h8jjgwecnx.getMaxWidth(div),
|
||||||
height: $_7rx1rygfjfuw8por.getMaxHeight(div)
|
height: $_jbvx7h8jjgwecnx.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 $_g969ozgbjfuw8pom = { htmlToData: htmlToData };
|
var $_6mep3hh4jjgwecnt = { 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 $_dq3p76gjjfuw8poy = { guess: guess };
|
var $_d9gn6bhcjjgwecol = { 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;
|
||||||
$_7rx1rygfjfuw8por.setMaxWidth(div, data.width);
|
$_jbvx7h8jjgwecnx.setMaxWidth(div, data.width);
|
||||||
$_7rx1rygfjfuw8por.setMaxHeight(div, data.height);
|
$_jbvx7h8jjgwecnx.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 $_9oq1mlgkjfuw8pp0 = { updateHtml: updateHtml };
|
var $_s3qkohdjjgwecon = { 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, $_g969ozgbjfuw8pom.htmlToData($_bmkzfegajfuw8pol.getScripts(editor), data.embed));
|
global$2.extend(data, $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.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 = $_dq3p76gjjfuw8poy.guess(data.source1);
|
data.source1mime = $_d9gn6bhcjjgwecol.guess(data.source1);
|
||||||
data.source2mime = $_dq3p76gjjfuw8poy.guess(data.source2);
|
data.source2mime = $_d9gn6bhcjjgwecol.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 $_9oq1mlgkjfuw8pp0.updateHtml(data.embed, data, true);
|
return $_s3qkohdjjgwecon.updateHtml(data.embed, data, true);
|
||||||
} else {
|
} else {
|
||||||
var videoScript = $_9fg1sigejfuw8poq.getVideoScriptMatch($_bmkzfegajfuw8pol.getScripts(editor), data.source1);
|
var videoScript = $_4q3fmh7jjgwecnw.getVideoScriptMatch($_69rpmgh3jjgwecnr.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 = $_bmkzfegajfuw8pol.getAudioTemplateCallback(editor);
|
var audioTemplateCallback = $_69rpmgh3jjgwecnr.getAudioTemplateCallback(editor);
|
||||||
var videoTemplateCallback = $_bmkzfegajfuw8pol.getVideoTemplateCallback(editor);
|
var videoTemplateCallback = $_69rpmgh3jjgwecnr.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 $_ekbiypgijfuw8pov = { dataToHtml: dataToHtml };
|
var $_bc7nlthbjjgwecoh = { 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 $_ekbiypgijfuw8pov.dataToHtml(editor, data);
|
return $_bc7nlthbjjgwecoh.dataToHtml(editor, data);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var getEmbedHtml = function (editor, data) {
|
var getEmbedHtml = function (editor, data) {
|
||||||
var embedHandler = $_bmkzfegajfuw8pol.getUrlResolver(editor);
|
var embedHandler = $_69rpmgh3jjgwecnr.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 $_6v4rhbggjfuw8pos = {
|
var $_cwvqyth9jjgweco9 = {
|
||||||
getEmbedHtml: getEmbedHtml,
|
getEmbedHtml: getEmbedHtml,
|
||||||
isCached: isCached
|
isCached: isCached
|
||||||
};
|
};
|
||||||
@ -631,7 +631,7 @@ var media = (function () {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var $_32c8argojfuw8ppe = {
|
var $_ewaahuhhjjgwecow = {
|
||||||
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': $_7rx1rygfjfuw8por.getMaxWidth(element),
|
'width': $_jbvx7h8jjgwecnx.getMaxWidth(element),
|
||||||
'height': $_7rx1rygfjfuw8por.getMaxHeight(element)
|
'height': $_jbvx7h8jjgwecnx.getMaxHeight(element)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return element.getAttribute('data-mce-object') ? $_g969ozgbjfuw8pom.htmlToData($_bmkzfegajfuw8pol.getScripts(editor), editor.serializer.serialize(element, { selection: true })) : {};
|
return element.getAttribute('data-mce-object') ? $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.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($_g969ozgbjfuw8pom.htmlToData($_bmkzfegajfuw8pol.getScripts(editor), html), { source1: response.url });
|
var data = global$2.extend($_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.getScripts(editor), html), { source1: response.url });
|
||||||
win.fromJSON(data);
|
win.fromJSON(data);
|
||||||
if (embed) {
|
if (embed) {
|
||||||
embed.value(html);
|
embed.value(html);
|
||||||
$_32c8argojfuw8ppe.updateSize(win);
|
$_ewaahuhhjjgwecow.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 = $_9oq1mlgkjfuw8pp0.updateHtml(data.embed, data);
|
data.embed = $_s3qkohdjjgwecon.updateHtml(data.embed, data);
|
||||||
if (data.embed && $_6v4rhbggjfuw8pos.isCached(data.source1)) {
|
if (data.embed && $_cwvqyth9jjgweco9.isCached(data.source1)) {
|
||||||
handleInsert(editor, data.embed);
|
handleInsert(editor, data.embed);
|
||||||
} else {
|
} else {
|
||||||
$_6v4rhbggjfuw8pos.getEmbedHtml(editor, data).then(function (response) {
|
$_cwvqyth9jjgweco9.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 () {
|
||||||
$_6v4rhbggjfuw8pos.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
$_cwvqyth9jjgweco9.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
||||||
}, 1);
|
}, 1);
|
||||||
},
|
},
|
||||||
onchange: function (e) {
|
onchange: function (e) {
|
||||||
$_6v4rhbggjfuw8pos.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
$_cwvqyth9jjgweco9.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($_9oq1mlgkjfuw8pp0.updateHtml(data.embed, data));
|
win.find('#embed').value($_s3qkohdjjgwecon.updateHtml(data.embed, data));
|
||||||
};
|
};
|
||||||
if ($_bmkzfegajfuw8pol.hasAltSource(editor)) {
|
if ($_69rpmgh3jjgwecnr.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 ($_bmkzfegajfuw8pol.hasPoster(editor)) {
|
if ($_69rpmgh3jjgwecnr.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 ($_bmkzfegajfuw8pol.hasDimensions(editor)) {
|
if ($_69rpmgh3jjgwecnr.hasDimensions(editor)) {
|
||||||
var control = $_32c8argojfuw8ppe.createUi(reserialise);
|
var control = $_ewaahuhhjjgwecow.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({}, $_g969ozgbjfuw8pom.htmlToData($_bmkzfegajfuw8pol.getScripts(editor), this.value()));
|
data = global$2.extend({}, $_6mep3hh4jjgwecnt.htmlToData($_69rpmgh3jjgwecnr.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 () {
|
||||||
$_32c8argojfuw8ppe.updateSize(win);
|
$_ewaahuhhjjgwecow.updateSize(win);
|
||||||
submitForm(win, editor);
|
submitForm(win, editor);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$_32c8argojfuw8ppe.syncSize(win);
|
$_ewaahuhhjjgwecow.syncSize(win);
|
||||||
};
|
};
|
||||||
var $_92htb0g7jfuw8pog = { showDialog: showDialog };
|
var $_e3lvjbh0jjgwecnm = { showDialog: showDialog };
|
||||||
|
|
||||||
var get = function (editor) {
|
var get = function (editor) {
|
||||||
var showDialog = function () {
|
var showDialog = function () {
|
||||||
$_92htb0g7jfuw8pog.showDialog(editor);
|
$_e3lvjbh0jjgwecnm.showDialog(editor);
|
||||||
};
|
};
|
||||||
return { showDialog: showDialog };
|
return { showDialog: showDialog };
|
||||||
};
|
};
|
||||||
var $_4zi4sfg6jfuw8poe = { get: get };
|
var $_9lh0mgzjjgwecnk = { get: get };
|
||||||
|
|
||||||
var register = function (editor) {
|
var register = function (editor) {
|
||||||
var showDialog = function () {
|
var showDialog = function () {
|
||||||
$_92htb0g7jfuw8pog.showDialog(editor);
|
$_e3lvjbh0jjgwecnm.showDialog(editor);
|
||||||
};
|
};
|
||||||
editor.addCommand('mceMedia', showDialog);
|
editor.addCommand('mceMedia', showDialog);
|
||||||
};
|
};
|
||||||
var $_1si9ufgpjfuw8ppg = { register: register };
|
var $_3pne6fhijjgwecoz = { 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 ($_bmkzfegajfuw8pol.shouldFilterHtml(editor) === false) {
|
if ($_69rpmgh3jjgwecnr.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 $_77d5ybgtjfuw8ppp = { sanitize: sanitize };
|
var $_58i2qvhmjjgwecp7 = { 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($_77d5ybgtjfuw8ppp.sanitize(editor, innerHtml)));
|
targetNode.attr('data-mce-html', escape($_58i2qvhmjjgwecp7.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 = $_9fg1sigejfuw8poq.getVideoScriptMatch($_bmkzfegajfuw8pol.getScripts(editor), node.attr('src'));
|
videoScript = $_4q3fmh7jjgwecnw.getVideoScriptMatch($_69rpmgh3jjgwecnr.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' && $_bmkzfegajfuw8pol.hasLiveEmbeds(editor) && global$1.ceFalse) {
|
if (node.name === 'iframe' && $_69rpmgh3jjgwecnr.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 $_bp9pftgsjfuw8ppl = {
|
var $_ggjz3ehljjgwecp4 = {
|
||||||
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', $_bp9pftgsjfuw8ppl.placeHolderConverter(editor));
|
editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', $_ggjz3ehljjgwecp4.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 = $_77d5ybgtjfuw8ppp.sanitize(editor, unescape(innerHtml));
|
innerNode.value = $_58i2qvhmjjgwecp7.sanitize(editor, unescape(innerHtml));
|
||||||
realElm.append(innerNode);
|
realElm.append(innerNode);
|
||||||
}
|
}
|
||||||
node.replace(realElm);
|
node.replace(realElm);
|
||||||
@ -1085,7 +1085,7 @@ var media = (function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_7xjmklgqjfuw8pph = { setup: setup };
|
var $_4o7ga9hjjjgwecp0 = { 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 $_8fr4logujfuw8ppr = { setup: setup$1 };
|
var $_1y6lb6hnjjgwecp9 = { 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($_9oq1mlgkjfuw8pp0.updateHtml(html, {
|
target.setAttribute('data-mce-html', escape($_s3qkohdjjgwecon.updateHtml(html, {
|
||||||
width: e.width,
|
width: e.width,
|
||||||
height: e.height
|
height: e.height
|
||||||
})));
|
})));
|
||||||
@ -1127,7 +1127,7 @@ var media = (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_b7skwpgvjfuw8pps = { setup: setup$2 };
|
var $_dnm1d2hojjgwecpa = { 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 $_7zyd29gwjfuw8ppt = { register: register$1 };
|
var $_94c7u1hpjjgwecpc = { register: register$1 };
|
||||||
|
|
||||||
global.add('media', function (editor) {
|
global.add('media', function (editor) {
|
||||||
$_1si9ufgpjfuw8ppg.register(editor);
|
$_3pne6fhijjgwecoz.register(editor);
|
||||||
$_7zyd29gwjfuw8ppt.register(editor);
|
$_94c7u1hpjjgwecpc.register(editor);
|
||||||
$_8fr4logujfuw8ppr.setup(editor);
|
$_1y6lb6hnjjgwecp9.setup(editor);
|
||||||
$_7xjmklgqjfuw8pph.setup(editor);
|
$_4o7ga9hjjjgwecp0.setup(editor);
|
||||||
$_b7skwpgvjfuw8pps.setup(editor);
|
$_dnm1d2hojjgwecpa.setup(editor);
|
||||||
return $_4zi4sfg6jfuw8poe.get(editor);
|
return $_9lh0mgzjjgwecnk.get(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ var paste = (function () {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_5e30n7hljfuw8pt8 = { hasProPlugin: hasProPlugin };
|
var $_15bf6siejjgwect1 = { 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 $_4xrki5hmjfuw8pta = { get: get };
|
var $_6gtliyigjjgwecte = { 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 $_ae0f8dhpjfuw8pte = {
|
var $_8tki3zijjjgwectj = {
|
||||||
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 $_dls6llhqjfuw8ptf = {
|
var $_xr8b0ikjjgwectl = {
|
||||||
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 && $_dls6llhqjfuw8ptf.shouldPlainTextInform(editor);
|
return userIsInformedState.get() === false && $_xr8b0ikjjgwectl.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');
|
||||||
$_ae0f8dhpjfuw8pte.firePastePlainTextToggle(editor, false);
|
$_8tki3zijjjgwectj.firePastePlainTextToggle(editor, false);
|
||||||
} else {
|
} else {
|
||||||
clipboard.pasteFormat.set('text');
|
clipboard.pasteFormat.set('text');
|
||||||
$_ae0f8dhpjfuw8pte.firePastePlainTextToggle(editor, true);
|
$_8tki3zijjjgwectj.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 $_btm9r2hojfuw8ptc = { togglePlainTextPaste: togglePlainTextPaste };
|
var $_2j7vw7iijjgwecti = { togglePlainTextPaste: togglePlainTextPaste };
|
||||||
|
|
||||||
var register = function (editor, clipboard, userIsInformedState) {
|
var register = function (editor, clipboard, userIsInformedState) {
|
||||||
editor.addCommand('mceTogglePlainTextPaste', function () {
|
editor.addCommand('mceTogglePlainTextPaste', function () {
|
||||||
$_btm9r2hojfuw8ptc.togglePlainTextPaste(editor, clipboard, userIsInformedState);
|
$_2j7vw7iijjgwecti.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 $_a15l7thnjfuw8pta = { register: register };
|
var $_fldd1mihjjgwecth = { 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 $_ceqsrthxjfuw8ptx = {
|
var $_4x13hjirjjgwecu1 = {
|
||||||
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 $_7lc4hihyjfuw8pty = {
|
var $_4h3hnrisjjgwecu2 = {
|
||||||
isPlainText: isPlainText,
|
isPlainText: isPlainText,
|
||||||
convert: convert,
|
convert: convert,
|
||||||
toBRs: toBRs,
|
toBRs: toBRs,
|
||||||
@ -273,15 +273,15 @@ var paste = (function () {
|
|||||||
var ignoreElements = global$3.makeMap('script noscript style textarea video audio iframe object', ' ');
|
var ignoreElements = global$3.makeMap('script noscript style textarea video audio iframe object', ' ');
|
||||||
var blockElements = schema.getBlockElements();
|
var blockElements = schema.getBlockElements();
|
||||||
function walk(node) {
|
function walk(node) {
|
||||||
var name = node.name, currentNode = node;
|
var name$$1 = node.name, currentNode = node;
|
||||||
if (name === 'br') {
|
if (name$$1 === 'br') {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shortEndedElements[name]) {
|
if (shortEndedElements[name$$1]) {
|
||||||
text += ' ';
|
text += ' ';
|
||||||
}
|
}
|
||||||
if (ignoreElements[name]) {
|
if (ignoreElements[name$$1]) {
|
||||||
text += ' ';
|
text += ' ';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -295,9 +295,9 @@ var paste = (function () {
|
|||||||
} while (node = node.next);
|
} while (node = node.next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (blockElements[name] && currentNode.next) {
|
if (blockElements[name$$1] && currentNode.next) {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
if (name === 'p') {
|
if (name$$1 === 'p') {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -334,7 +334,7 @@ var paste = (function () {
|
|||||||
var isMsEdge = function () {
|
var isMsEdge = function () {
|
||||||
return navigator.userAgent.indexOf(' Edge/') !== -1;
|
return navigator.userAgent.indexOf(' Edge/') !== -1;
|
||||||
};
|
};
|
||||||
var $_cedk7ri6jfuw8pud = {
|
var $_4bi2o9j0jjgwecui = {
|
||||||
filter: filter,
|
filter: filter,
|
||||||
innerText: innerText,
|
innerText: innerText,
|
||||||
trimHtml: trimHtml,
|
trimHtml: trimHtml,
|
||||||
@ -529,7 +529,7 @@ var paste = (function () {
|
|||||||
if (name.indexOf('mso-') === 0) {
|
if (name.indexOf('mso-') === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($_dls6llhqjfuw8ptf.getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
|
if ($_xr8b0ikjjgwectl.getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
|
||||||
outputStyles[name] = value;
|
outputStyles[name] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -549,11 +549,11 @@ var paste = (function () {
|
|||||||
}
|
}
|
||||||
var filterWordContent = function (editor, content) {
|
var filterWordContent = function (editor, content) {
|
||||||
var retainStyleProperties, validStyles;
|
var retainStyleProperties, validStyles;
|
||||||
retainStyleProperties = $_dls6llhqjfuw8ptf.getRetainStyleProps(editor);
|
retainStyleProperties = $_xr8b0ikjjgwectl.getRetainStyleProps(editor);
|
||||||
if (retainStyleProperties) {
|
if (retainStyleProperties) {
|
||||||
validStyles = global$3.makeMap(retainStyleProperties.split(/[, ]/));
|
validStyles = global$3.makeMap(retainStyleProperties.split(/[, ]/));
|
||||||
}
|
}
|
||||||
content = $_cedk7ri6jfuw8pud.filter(content, [
|
content = $_4bi2o9j0jjgwecui.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 +573,7 @@ var paste = (function () {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
var validElements = $_dls6llhqjfuw8ptf.getWordValidElements(editor);
|
var validElements = $_xr8b0ikjjgwectl.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 +647,16 @@ var paste = (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
var rootNode = domParser.parse(content);
|
var rootNode = domParser.parse(content);
|
||||||
if ($_dls6llhqjfuw8ptf.shouldConvertWordFakeLists(editor)) {
|
if ($_xr8b0ikjjgwectl.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 $_dls6llhqjfuw8ptf.shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
|
return $_xr8b0ikjjgwectl.shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
|
||||||
};
|
};
|
||||||
var $_8q8fy4i1jfuw8pu5 = {
|
var $_dfatuiivjjgwecu8 = {
|
||||||
preProcess: preProcess,
|
preProcess: preProcess,
|
||||||
isWordContent: isWordContent
|
isWordContent: isWordContent
|
||||||
};
|
};
|
||||||
@ -669,11 +669,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 = $_ae0f8dhpjfuw8pte.firePastePostProcess(editor, tempBody, internal, isWordHtml);
|
var postProcessArgs = $_8tki3zijjjgwectj.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 = $_ae0f8dhpjfuw8pte.firePastePreProcess(editor, content, internal, isWordHtml);
|
var preProcessArgs = $_8tki3zijjjgwectj.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 +681,15 @@ var paste = (function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
var process = function (editor, html, internal) {
|
var process = function (editor, html, internal) {
|
||||||
var isWordHtml = $_8q8fy4i1jfuw8pu5.isWordContent(html);
|
var isWordHtml = $_dfatuiivjjgwecu8.isWordContent(html);
|
||||||
var content = isWordHtml ? $_8q8fy4i1jfuw8pu5.preProcess(editor, html) : html;
|
var content = isWordHtml ? $_dfatuiivjjgwecu8.preProcess(editor, html) : html;
|
||||||
return filterContent(editor, content, internal, isWordHtml);
|
return filterContent(editor, content, internal, isWordHtml);
|
||||||
};
|
};
|
||||||
var $_g5r539i0jfuw8pu1 = { process: process };
|
var $_3scw66iujjgwecu4 = { process: process };
|
||||||
|
|
||||||
var pasteHtml = function (editor, html) {
|
var pasteHtml = function (editor, html) {
|
||||||
editor.insertContent(html, {
|
editor.insertContent(html, {
|
||||||
merge: $_dls6llhqjfuw8ptf.shouldMergeFormats(editor),
|
merge: $_xr8b0ikjjgwectl.shouldMergeFormats(editor),
|
||||||
paste: true
|
paste: true
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@ -732,28 +732,28 @@ var paste = (function () {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
var insertContent = function (editor, html) {
|
var insertContent = function (editor, html) {
|
||||||
if ($_dls6llhqjfuw8ptf.isSmartPasteEnabled(editor) === false) {
|
if ($_xr8b0ikjjgwectl.isSmartPasteEnabled(editor) === false) {
|
||||||
pasteHtml(editor, html);
|
pasteHtml(editor, html);
|
||||||
} else {
|
} else {
|
||||||
smartInsertContent(editor, html);
|
smartInsertContent(editor, html);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_6s6wwwi7jfuw8puh = {
|
var $_d8pzpej1jjgwecum = {
|
||||||
isImageUrl: isImageUrl,
|
isImageUrl: isImageUrl,
|
||||||
isAbsoluteUrl: isAbsoluteUrl,
|
isAbsoluteUrl: isAbsoluteUrl,
|
||||||
insertContent: insertContent
|
insertContent: insertContent
|
||||||
};
|
};
|
||||||
|
|
||||||
var pasteHtml$1 = function (editor, html, internalFlag) {
|
var pasteHtml$1 = function (editor, html, internalFlag) {
|
||||||
var internal = internalFlag ? internalFlag : $_ceqsrthxjfuw8ptx.isMarked(html);
|
var internal = internalFlag ? internalFlag : $_4x13hjirjjgwecu1.isMarked(html);
|
||||||
var args = $_g5r539i0jfuw8pu1.process(editor, $_ceqsrthxjfuw8ptx.unmark(html), internal);
|
var args = $_3scw66iujjgwecu4.process(editor, $_4x13hjirjjgwecu1.unmark(html), internal);
|
||||||
if (args.cancelled === false) {
|
if (args.cancelled === false) {
|
||||||
$_6s6wwwi7jfuw8puh.insertContent(editor, args.content);
|
$_d8pzpej1jjgwecum.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 = $_7lc4hihyjfuw8pty.convert(text, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs);
|
text = $_4h3hnrisjjgwecu2.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 +783,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 $_cedk7ri6jfuw8pud.isMsEdge() ? global$3.extend(content, { 'text/html': '' }) : content;
|
return $_4bi2o9j0jjgwecui.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,8 +806,8 @@ 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 pasteImage = function (editor, rng, reader, blob) {
|
var pasteImage = function (editor, rng, reader, blob) {
|
||||||
var uniqueId = $_cedk7ri6jfuw8pud.createIdGenerator('mceclip');
|
|
||||||
if (rng) {
|
if (rng) {
|
||||||
editor.selection.setRng(rng);
|
editor.selection.setRng(rng);
|
||||||
rng = null;
|
rng = null;
|
||||||
@ -815,7 +815,7 @@ var paste = (function () {
|
|||||||
var dataUri = reader.result;
|
var dataUri = reader.result;
|
||||||
var base64 = getBase64FromUri(dataUri);
|
var base64 = getBase64FromUri(dataUri);
|
||||||
var id = uniqueId();
|
var id = uniqueId();
|
||||||
var name = editor.settings.images_reuse_filename && blob.name ? extractFilename(editor, blob.name) : id;
|
var name$$1 = editor.settings.images_reuse_filename && blob.name ? extractFilename(editor, blob.name) : id;
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
img.src = dataUri;
|
img.src = dataUri;
|
||||||
if (isValidDataUriImage(editor.settings, img)) {
|
if (isValidDataUriImage(editor.settings, img)) {
|
||||||
@ -825,7 +825,7 @@ var paste = (function () {
|
|||||||
return cachedBlobInfo.base64() === base64;
|
return cachedBlobInfo.base64() === base64;
|
||||||
});
|
});
|
||||||
if (!existingBlobInfo) {
|
if (!existingBlobInfo) {
|
||||||
blobInfo = blobCache.create(id, blob, base64, name);
|
blobInfo = blobCache.create(id, blob, base64, name$$1);
|
||||||
blobCache.add(blobInfo);
|
blobCache.add(blobInfo);
|
||||||
} else {
|
} else {
|
||||||
blobInfo = existingBlobInfo;
|
blobInfo = existingBlobInfo;
|
||||||
@ -835,8 +835,8 @@ var paste = (function () {
|
|||||||
pasteHtml$1(editor, '<img src="' + dataUri + '">', false);
|
pasteHtml$1(editor, '<img src="' + dataUri + '">', false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var isClipboardEvent = function (event) {
|
var isClipboardEvent = function (event$$1) {
|
||||||
return event.type === 'paste';
|
return event$$1.type === 'paste';
|
||||||
};
|
};
|
||||||
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;
|
||||||
@ -886,7 +886,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();
|
||||||
$_ae0f8dhpjfuw8pte.firePaste(editor, true);
|
$_8tki3zijjjgwectj.firePaste(editor, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pasteBin.remove();
|
pasteBin.remove();
|
||||||
@ -903,14 +903,14 @@ var paste = (function () {
|
|||||||
content = clipboardContent['text/html'];
|
content = clipboardContent['text/html'];
|
||||||
} else {
|
} else {
|
||||||
content = pasteBin.getHtml();
|
content = pasteBin.getHtml();
|
||||||
internal = internal ? internal : $_ceqsrthxjfuw8ptx.isMarked(content);
|
internal = internal ? internal : $_4x13hjirjjgwecu1.isMarked(content);
|
||||||
if (pasteBin.isDefaultContent(content)) {
|
if (pasteBin.isDefaultContent(content)) {
|
||||||
plainTextMode = true;
|
plainTextMode = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
content = $_cedk7ri6jfuw8pud.trimHtml(content);
|
content = $_4bi2o9j0jjgwecui.trimHtml(content);
|
||||||
pasteBin.remove();
|
pasteBin.remove();
|
||||||
isPlainTextHtml = internal === false && $_7lc4hihyjfuw8pty.isPlainText(content);
|
isPlainTextHtml = internal === false && $_4h3hnrisjjgwecu2.isPlainText(content);
|
||||||
if (!content.length || isPlainTextHtml) {
|
if (!content.length || isPlainTextHtml) {
|
||||||
plainTextMode = true;
|
plainTextMode = true;
|
||||||
}
|
}
|
||||||
@ -918,7 +918,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 = $_cedk7ri6jfuw8pud.innerText(content);
|
content = $_4bi2o9j0jjgwecui.innerText(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pasteBin.isDefaultContent(content)) {
|
if (pasteBin.isDefaultContent(content)) {
|
||||||
@ -942,7 +942,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, $_ceqsrthxjfuw8ptx.internalHtmlMime());
|
var internal = hasContentType(clipboardContent, $_4x13hjirjjgwecu1.internalHtmlMime());
|
||||||
keyboardPastePlainTextState = false;
|
keyboardPastePlainTextState = false;
|
||||||
if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
|
if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
|
||||||
pasteBin.remove();
|
pasteBin.remove();
|
||||||
@ -966,7 +966,7 @@ var paste = (function () {
|
|||||||
if (hasContentType(clipboardContent, 'text/html')) {
|
if (hasContentType(clipboardContent, 'text/html')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!internal) {
|
if (!internal) {
|
||||||
internal = $_ceqsrthxjfuw8ptx.isMarked(clipboardContent['text/html']);
|
internal = $_4x13hjirjjgwecu1.isMarked(clipboardContent['text/html']);
|
||||||
}
|
}
|
||||||
insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
|
insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
|
||||||
} else {
|
} else {
|
||||||
@ -979,7 +979,7 @@ var paste = (function () {
|
|||||||
var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
|
var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
|
||||||
registerEventHandlers(editor, pasteBin, pasteFormat);
|
registerEventHandlers(editor, pasteBin, pasteFormat);
|
||||||
var src;
|
var src;
|
||||||
editor.parser.addNodeFilter('img', function (nodes, name, args) {
|
editor.parser.addNodeFilter('img', function (nodes, name$$1, args) {
|
||||||
var isPasteInsert = function (args) {
|
var isPasteInsert = function (args) {
|
||||||
return args.data && args.data.paste === true;
|
return args.data && args.data.paste === true;
|
||||||
};
|
};
|
||||||
@ -1011,72 +1011,31 @@ var paste = (function () {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var getPasteBinParent = function (editor) {
|
||||||
|
return global$1.ie && editor.inline ? document.body : editor.getBody();
|
||||||
|
};
|
||||||
|
var isExternalPasteBin = function (editor) {
|
||||||
|
return getPasteBinParent(editor) !== editor.getBody();
|
||||||
|
};
|
||||||
|
var delegatePasteEvents = function (editor, pasteBinElm) {
|
||||||
|
if (isExternalPasteBin(editor)) {
|
||||||
|
editor.dom.bind(pasteBinElm, 'paste keyup', function (e) {
|
||||||
|
setTimeout(function () {
|
||||||
|
editor.fire('paste');
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
var create = function (editor, lastRngCell, pasteBinDefaultContent) {
|
var create = function (editor, lastRngCell, pasteBinDefaultContent) {
|
||||||
var dom = editor.dom, body = editor.getBody();
|
var dom = editor.dom, body = editor.getBody();
|
||||||
var viewport = editor.dom.getViewPort(editor.getWin());
|
|
||||||
var scrollTop = viewport.y, top = 20;
|
|
||||||
var pasteBinElm;
|
var pasteBinElm;
|
||||||
var scrollContainer;
|
|
||||||
lastRngCell.set(editor.selection.getRng());
|
lastRngCell.set(editor.selection.getRng());
|
||||||
var lastRng = lastRngCell.get();
|
pasteBinElm = editor.dom.add(getPasteBinParent(editor), 'div', {
|
||||||
if (editor.inline) {
|
|
||||||
scrollContainer = editor.selection.getScrollContainer();
|
|
||||||
if (scrollContainer && scrollContainer.scrollTop > 0) {
|
|
||||||
scrollTop = scrollContainer.scrollTop;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getCaretRect(rng) {
|
|
||||||
var rects, textNode, node;
|
|
||||||
var container = rng.startContainer;
|
|
||||||
rects = rng.getClientRects();
|
|
||||||
if (rects.length) {
|
|
||||||
return rects[0];
|
|
||||||
}
|
|
||||||
if (!rng.collapsed || container.nodeType !== 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
node = container.childNodes[lastRng.startOffset];
|
|
||||||
while (node && node.nodeType === 3 && !node.data.length) {
|
|
||||||
node = node.nextSibling;
|
|
||||||
}
|
|
||||||
if (!node) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (node.tagName === 'BR') {
|
|
||||||
textNode = dom.doc.createTextNode('\uFEFF');
|
|
||||||
node.parentNode.insertBefore(textNode, node);
|
|
||||||
rng = dom.createRng();
|
|
||||||
rng.setStartBefore(textNode);
|
|
||||||
rng.setEndAfter(textNode);
|
|
||||||
rects = rng.getClientRects();
|
|
||||||
dom.remove(textNode);
|
|
||||||
}
|
|
||||||
if (rects.length) {
|
|
||||||
return rects[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (lastRng.getClientRects) {
|
|
||||||
var rect = getCaretRect(lastRng);
|
|
||||||
if (rect) {
|
|
||||||
top = scrollTop + (rect.top - dom.getPos(body).y);
|
|
||||||
} else {
|
|
||||||
top = scrollTop;
|
|
||||||
var container = lastRng.startContainer;
|
|
||||||
if (container) {
|
|
||||||
if (container.nodeType === 3 && container.parentNode !== body) {
|
|
||||||
container = container.parentNode;
|
|
||||||
}
|
|
||||||
if (container.nodeType === 1) {
|
|
||||||
top = dom.getPos(container, scrollContainer || body).y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pasteBinElm = editor.dom.add(editor.getBody(), 'div', {
|
|
||||||
'id': 'mcepastebin',
|
'id': 'mcepastebin',
|
||||||
|
'class': 'mce-pastebin',
|
||||||
'contentEditable': true,
|
'contentEditable': true,
|
||||||
'data-mce-bogus': 'all',
|
'data-mce-bogus': 'all',
|
||||||
'style': 'position: absolute; top: ' + top + 'px; width: 10px; height: 10px; overflow: hidden; opacity: 0'
|
'style': 'position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0'
|
||||||
}, pasteBinDefaultContent);
|
}, pasteBinDefaultContent);
|
||||||
if (global$1.ie || global$1.gecko) {
|
if (global$1.ie || global$1.gecko) {
|
||||||
dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 65535 : -65535);
|
dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 65535 : -65535);
|
||||||
@ -1084,6 +1043,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);
|
||||||
pasteBinElm.focus();
|
pasteBinElm.focus();
|
||||||
editor.selection.select(pasteBinElm, true);
|
editor.selection.select(pasteBinElm, true);
|
||||||
};
|
};
|
||||||
@ -1110,7 +1070,7 @@ var paste = (function () {
|
|||||||
toElm.appendChild(fromElm);
|
toElm.appendChild(fromElm);
|
||||||
editor.dom.remove(fromElm, true);
|
editor.dom.remove(fromElm, true);
|
||||||
};
|
};
|
||||||
pasteBinClones = global$3.grep(editor.getBody().childNodes, function (elm) {
|
pasteBinClones = global$3.grep(getPasteBinParent(editor).childNodes, function (elm) {
|
||||||
return elm.id === 'mcepastebin';
|
return elm.id === 'mcepastebin';
|
||||||
});
|
});
|
||||||
pasteBinElm = pasteBinClones.shift();
|
pasteBinElm = pasteBinClones.shift();
|
||||||
@ -1191,7 +1151,7 @@ var paste = (function () {
|
|||||||
var noop = function () {
|
var noop = function () {
|
||||||
};
|
};
|
||||||
var hasWorkingClipboardApi = function (clipboardData) {
|
var hasWorkingClipboardApi = function (clipboardData) {
|
||||||
return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && $_cedk7ri6jfuw8pud.isMsEdge() !== true;
|
return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && $_4bi2o9j0jjgwecui.isMsEdge() !== true;
|
||||||
};
|
};
|
||||||
var setHtml5Clipboard = function (clipboardData, html, text) {
|
var setHtml5Clipboard = function (clipboardData, html, text) {
|
||||||
if (hasWorkingClipboardApi(clipboardData)) {
|
if (hasWorkingClipboardApi(clipboardData)) {
|
||||||
@ -1199,7 +1159,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($_ceqsrthxjfuw8ptx.internalHtmlMime(), html);
|
clipboardData.setData($_4x13hjirjjgwecu1.internalHtmlMime(), html);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
@ -1218,7 +1178,7 @@ var paste = (function () {
|
|||||||
};
|
};
|
||||||
var fallback = function (editor) {
|
var fallback = function (editor) {
|
||||||
return function (html, done) {
|
return function (html, done) {
|
||||||
var markedHtml = $_ceqsrthxjfuw8ptx.mark(html);
|
var markedHtml = $_4x13hjirjjgwecu1.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'
|
||||||
@ -1273,7 +1233,7 @@ var paste = (function () {
|
|||||||
editor.on('cut', cut(editor));
|
editor.on('cut', cut(editor));
|
||||||
editor.on('copy', copy(editor));
|
editor.on('copy', copy(editor));
|
||||||
};
|
};
|
||||||
var $_cphe9ai9jfuw8puq = { register: register$1 };
|
var $_32blojj3jjgwecv4 = { register: register$1 };
|
||||||
|
|
||||||
var global$10 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
|
var global$10 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
|
||||||
|
|
||||||
@ -1289,13 +1249,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 ($_dls6llhqjfuw8ptf.shouldBlockDrop(editor)) {
|
if ($_xr8b0ikjjgwectl.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 (!$_dls6llhqjfuw8ptf.shouldPasteDataImages(editor)) {
|
if (!$_xr8b0ikjjgwectl.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) {
|
||||||
@ -1310,11 +1270,11 @@ var paste = (function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dropContent = clipboard.getDataTransferItems(e.dataTransfer);
|
dropContent = clipboard.getDataTransferItems(e.dataTransfer);
|
||||||
var internal = clipboard.hasContentType(dropContent, $_ceqsrthxjfuw8ptx.internalHtmlMime());
|
var internal = clipboard.hasContentType(dropContent, $_4x13hjirjjgwecu1.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 && $_dls6llhqjfuw8ptf.shouldFilterDrop(editor)) {
|
if (rng && $_xr8b0ikjjgwectl.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();
|
||||||
@ -1324,7 +1284,7 @@ var paste = (function () {
|
|||||||
editor.execCommand('Delete');
|
editor.execCommand('Delete');
|
||||||
}
|
}
|
||||||
setFocusedRange(editor, rng);
|
setFocusedRange(editor, rng);
|
||||||
content_1 = $_cedk7ri6jfuw8pud.trimHtml(content_1);
|
content_1 = $_4bi2o9j0jjgwecui.trimHtml(content_1);
|
||||||
if (!dropContent['text/html']) {
|
if (!dropContent['text/html']) {
|
||||||
clipboard.pasteText(content_1);
|
clipboard.pasteText(content_1);
|
||||||
} else {
|
} else {
|
||||||
@ -1339,7 +1299,7 @@ var paste = (function () {
|
|||||||
draggingInternallyState.set(true);
|
draggingInternallyState.set(true);
|
||||||
});
|
});
|
||||||
editor.on('dragover dragend', function (e) {
|
editor.on('dragover dragend', function (e) {
|
||||||
if ($_dls6llhqjfuw8ptf.shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
|
if ($_xr8b0ikjjgwectl.shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
|
setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
|
||||||
}
|
}
|
||||||
@ -1348,24 +1308,24 @@ var paste = (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_2uhmpriajfuw8put = { setup: setup };
|
var $_b4etj0j4jjgwecv7 = { setup: setup };
|
||||||
|
|
||||||
var setup$1 = function (editor) {
|
var setup$1 = function (editor) {
|
||||||
var plugin = editor.plugins.paste;
|
var plugin = editor.plugins.paste;
|
||||||
var preProcess = $_dls6llhqjfuw8ptf.getPreProcess(editor);
|
var preProcess = $_xr8b0ikjjgwectl.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 = $_dls6llhqjfuw8ptf.getPostProcess(editor);
|
var postProcess = $_xr8b0ikjjgwectl.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 $_84oppricjfuw8pux = { setup: setup$1 };
|
var $_c5bihmj6jjgwecva = { setup: setup$1 };
|
||||||
|
|
||||||
function addPreProcessFilter(editor, filterFunc) {
|
function addPreProcessFilter(editor, filterFunc) {
|
||||||
editor.on('PastePreProcess', function (e) {
|
editor.on('PastePreProcess', function (e) {
|
||||||
@ -1378,7 +1338,7 @@ var paste = (function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function removeExplorerBrElementsAfterBlocks(editor, html) {
|
function removeExplorerBrElementsAfterBlocks(editor, html) {
|
||||||
if (!$_8q8fy4i1jfuw8pu5.isWordContent(html)) {
|
if (!$_dfatuiivjjgwecu8.isWordContent(html)) {
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
var blockElements = [];
|
var blockElements = [];
|
||||||
@ -1386,11 +1346,11 @@ var paste = (function () {
|
|||||||
blockElements.push(blockName);
|
blockElements.push(blockName);
|
||||||
});
|
});
|
||||||
var explorerBlocksRegExp = new RegExp('(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*', 'g');
|
var explorerBlocksRegExp = new RegExp('(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*', 'g');
|
||||||
html = $_cedk7ri6jfuw8pud.filter(html, [[
|
html = $_4bi2o9j0jjgwecui.filter(html, [[
|
||||||
explorerBlocksRegExp,
|
explorerBlocksRegExp,
|
||||||
'$1'
|
'$1'
|
||||||
]]);
|
]]);
|
||||||
html = $_cedk7ri6jfuw8pud.filter(html, [
|
html = $_4bi2o9j0jjgwecui.filter(html, [
|
||||||
[
|
[
|
||||||
/<br><br>/g,
|
/<br><br>/g,
|
||||||
'<BR><BR>'
|
'<BR><BR>'
|
||||||
@ -1410,9 +1370,9 @@ var paste = (function () {
|
|||||||
if (isWordHtml || internal) {
|
if (isWordHtml || internal) {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
var webKitStylesSetting = $_dls6llhqjfuw8ptf.getWebkitStyles(editor);
|
var webKitStylesSetting = $_xr8b0ikjjgwectl.getWebkitStyles(editor);
|
||||||
var webKitStyles;
|
var webKitStyles;
|
||||||
if ($_dls6llhqjfuw8ptf.shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
|
if ($_xr8b0ikjjgwectl.shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
if (webKitStylesSetting) {
|
if (webKitStylesSetting) {
|
||||||
@ -1464,43 +1424,8 @@ var paste = (function () {
|
|||||||
addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
|
addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var $_6bnerjidjfuw8puz = { setup: setup$2 };
|
var $_36tmgyj7jjgwecvc = { setup: setup$2 };
|
||||||
|
|
||||||
var noop$1 = function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var noarg = function (f) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return f();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var compose = function (fa, fb) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return fa(fb.apply(null, arguments));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var constant = function (value) {
|
|
||||||
return function () {
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var identity = function (x) {
|
|
||||||
return x;
|
|
||||||
};
|
|
||||||
var tripleEquals = function (a, b) {
|
|
||||||
return a === b;
|
|
||||||
};
|
|
||||||
var curry = function (f) {
|
var curry = function (f) {
|
||||||
var x = [];
|
var x = [];
|
||||||
for (var _i = 1; _i < arguments.length; _i++) {
|
for (var _i = 1; _i < arguments.length; _i++) {
|
||||||
@ -1521,43 +1446,6 @@ var paste = (function () {
|
|||||||
return f.apply(null, all);
|
return f.apply(null, all);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var not = function (f) {
|
|
||||||
return function () {
|
|
||||||
var x = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
x[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return !f.apply(null, arguments);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var die = function (msg) {
|
|
||||||
return function () {
|
|
||||||
throw new Error(msg);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var apply = function (f) {
|
|
||||||
return f();
|
|
||||||
};
|
|
||||||
var call = function (f) {
|
|
||||||
f();
|
|
||||||
};
|
|
||||||
var never = constant(false);
|
|
||||||
var always = constant(true);
|
|
||||||
var $_avmd1ifjfuw8pv5 = {
|
|
||||||
noop: noop$1,
|
|
||||||
noarg: noarg,
|
|
||||||
compose: compose,
|
|
||||||
constant: constant,
|
|
||||||
identity: identity,
|
|
||||||
tripleEquals: tripleEquals,
|
|
||||||
curry: curry,
|
|
||||||
not: not,
|
|
||||||
die: die,
|
|
||||||
apply: apply,
|
|
||||||
call: call,
|
|
||||||
never: never,
|
|
||||||
always: always
|
|
||||||
};
|
|
||||||
|
|
||||||
var stateChange = function (editor, clipboard, e) {
|
var stateChange = function (editor, clipboard, e) {
|
||||||
var ctrl = e.control;
|
var ctrl = e.control;
|
||||||
@ -1567,7 +1455,7 @@ var paste = (function () {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
var register$2 = function (editor, clipboard) {
|
var register$2 = function (editor, clipboard) {
|
||||||
var postRender = $_avmd1ifjfuw8pv5.curry(stateChange, editor, clipboard);
|
var postRender = curry(stateChange, editor, clipboard);
|
||||||
editor.addButton('pastetext', {
|
editor.addButton('pastetext', {
|
||||||
active: false,
|
active: false,
|
||||||
icon: 'pastetext',
|
icon: 'pastetext',
|
||||||
@ -1583,21 +1471,21 @@ var paste = (function () {
|
|||||||
onPostRender: postRender
|
onPostRender: postRender
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_3d07oyiejfuw8pv2 = { register: register$2 };
|
var $_g9yhwdj8jjgwecvf = { register: register$2 };
|
||||||
|
|
||||||
global.add('paste', function (editor) {
|
global.add('paste', function (editor) {
|
||||||
if ($_5e30n7hljfuw8pt8.hasProPlugin(editor) === false) {
|
if ($_15bf6siejjgwect1.hasProPlugin(editor) === false) {
|
||||||
var userIsInformedState = Cell(false);
|
var userIsInformedState = Cell(false);
|
||||||
var draggingInternallyState = Cell(false);
|
var draggingInternallyState = Cell(false);
|
||||||
var pasteFormat = Cell($_dls6llhqjfuw8ptf.isPasteAsTextEnabled(editor) ? 'text' : 'html');
|
var pasteFormat = Cell($_xr8b0ikjjgwectl.isPasteAsTextEnabled(editor) ? 'text' : 'html');
|
||||||
var clipboard = Clipboard(editor, pasteFormat);
|
var clipboard = Clipboard(editor, pasteFormat);
|
||||||
var quirks = $_6bnerjidjfuw8puz.setup(editor);
|
var quirks = $_36tmgyj7jjgwecvc.setup(editor);
|
||||||
$_3d07oyiejfuw8pv2.register(editor, clipboard);
|
$_g9yhwdj8jjgwecvf.register(editor, clipboard);
|
||||||
$_a15l7thnjfuw8pta.register(editor, clipboard, userIsInformedState);
|
$_fldd1mihjjgwecth.register(editor, clipboard, userIsInformedState);
|
||||||
$_84oppricjfuw8pux.setup(editor);
|
$_c5bihmj6jjgwecva.setup(editor);
|
||||||
$_cphe9ai9jfuw8puq.register(editor);
|
$_32blojj3jjgwecv4.register(editor);
|
||||||
$_2uhmpriajfuw8put.setup(editor, clipboard, draggingInternallyState);
|
$_b4etj0j4jjgwecv7.setup(editor, clipboard, draggingInternallyState);
|
||||||
return $_4xrki5hmjfuw8pta.get(clipboard, quirks);
|
return $_6gtliyigjjgwecte.get(clipboard, quirks);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -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 $_54igvnk1jfuw8q35 = { getTabFocus: getTabFocus };
|
var $_8rita4kwjjgwed4m = { 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($_54igvnk1jfuw8q35.getTabFocus(editor));
|
v = global$5.explode($_8rita4kwjjgwed4m.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 $_4nj741jujfuw8q2z = { setup: setup };
|
var $_6zogdykpjjgwed4h = { setup: setup };
|
||||||
|
|
||||||
global.add('tabfocus', function (editor) {
|
global.add('tabfocus', function (editor) {
|
||||||
$_4nj741jujfuw8q2z.setup(editor);
|
$_6zogdykpjjgwed4h.setup(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d={getTabFocus:function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))}},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d.getTabFocus(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&c.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&c.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
|
@ -39,7 +39,7 @@ var textcolor = (function () {
|
|||||||
editor.nodeChanged();
|
editor.nodeChanged();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_4zaeklqljfuw8rym = {
|
var $_b0p88yrijjgwefd2 = {
|
||||||
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) {
|
||||||
$_4zaeklqljfuw8rym.applyFormat(editor, format, value);
|
$_b0p88yrijjgwefd2.applyFormat(editor, format, value);
|
||||||
});
|
});
|
||||||
editor.addCommand('mceRemoveTextcolor', function (format) {
|
editor.addCommand('mceRemoveTextcolor', function (format) {
|
||||||
$_4zaeklqljfuw8rym.removeFormat(editor, format);
|
$_b0p88yrijjgwefd2.removeFormat(editor, format);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_5bxwpcqkjfuw8ryl = { register: register };
|
var $_g2o2pirhjjgwefd1 = { 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 $_92xy2xqpjfuw8ryt = {
|
var $_2rfqb7rmjjgwefd9 = {
|
||||||
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 ? '×' : '') + '</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 ? '×' : '') + '</div>' + '</td>';
|
||||||
};
|
};
|
||||||
colors = $_4zaeklqljfuw8rym.mapColors(colorMap);
|
colors = $_b0p88yrijjgwefd2.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 $_2vokwrqqjfuw8ryv = { getHtml: getHtml };
|
var $_fihh7qrnjjgwefdb = { getHtml: getHtml };
|
||||||
|
|
||||||
var setDivColor = function setDivColor(div, value) {
|
var setDivColor = function setDivColor(div, value) {
|
||||||
div.style.background = value;
|
div.style.background = value;
|
||||||
@ -244,20 +244,20 @@ var textcolor = (function () {
|
|||||||
return function (e) {
|
return function (e) {
|
||||||
var buttonCtrl = this.parent();
|
var buttonCtrl = this.parent();
|
||||||
var value;
|
var value;
|
||||||
var currentColor = $_4zaeklqljfuw8rym.getCurrentColor(editor, buttonCtrl.settings.format);
|
var currentColor = $_b0p88yrijjgwefd2.getCurrentColor(editor, buttonCtrl.settings.format);
|
||||||
var selectColor = function (value) {
|
var selectColor = function (value) {
|
||||||
|
editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
|
||||||
buttonCtrl.hidePanel();
|
buttonCtrl.hidePanel();
|
||||||
buttonCtrl.color(value);
|
buttonCtrl.color(value);
|
||||||
editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
|
|
||||||
};
|
};
|
||||||
var resetColor = function () {
|
var resetColor = function () {
|
||||||
|
editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format);
|
||||||
buttonCtrl.hidePanel();
|
buttonCtrl.hidePanel();
|
||||||
buttonCtrl.resetColor();
|
buttonCtrl.resetColor();
|
||||||
editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format);
|
|
||||||
};
|
};
|
||||||
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 = $_92xy2xqpjfuw8ryt.getColorPickerCallback(editor);
|
var colorPickerCallback = $_2rfqb7rmjjgwefd9.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 ? $_92xy2xqpjfuw8ryt.getForeColorCols(editor) : $_92xy2xqpjfuw8ryt.getBackColorCols(editor);
|
var cols = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorCols(editor) : $_2rfqb7rmjjgwefd9.getBackColorCols(editor);
|
||||||
var rows = foreColor ? $_92xy2xqpjfuw8ryt.getForeColorRows(editor) : $_92xy2xqpjfuw8ryt.getBackColorRows(editor);
|
var rows = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorRows(editor) : $_2rfqb7rmjjgwefd9.getBackColorRows(editor);
|
||||||
var colorMap = foreColor ? $_92xy2xqpjfuw8ryt.getForeColorMap(editor) : $_92xy2xqpjfuw8ryt.getBackColorMap(editor);
|
var colorMap = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorMap(editor) : $_2rfqb7rmjjgwefd9.getBackColorMap(editor);
|
||||||
var hasColorPicker = $_92xy2xqpjfuw8ryt.hasColorPicker(editor);
|
var hasColorPicker = $_2rfqb7rmjjgwefd9.hasColorPicker(editor);
|
||||||
return $_2vokwrqqjfuw8ryv.getHtml(cols, rows, colorMap, hasColorPicker);
|
return $_fihh7qrnjjgwefdb.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, $_92xy2xqpjfuw8ryt.getForeColorCols(editor))
|
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.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, $_92xy2xqpjfuw8ryt.getBackColorCols(editor))
|
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.getBackColorCols(editor))
|
||||||
},
|
},
|
||||||
onclick: onButtonClick(editor)
|
onclick: onButtonClick(editor)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var $_f806lqqmjfuw8ryo = { register: register$1 };
|
var $_8npvswrjjjgwefd5 = { register: register$1 };
|
||||||
|
|
||||||
global.add('textcolor', function (editor) {
|
global.add('textcolor', function (editor) {
|
||||||
$_5bxwpcqkjfuw8ryl.register(editor);
|
$_g2o2pirhjjgwefd1.register(editor);
|
||||||
$_f806lqqmjfuw8ryo.register(editor);
|
$_8npvswrjjjgwefd5.register(editor);
|
||||||
});
|
});
|
||||||
function Plugin () {
|
function Plugin () {
|
||||||
}
|
}
|
||||||
|
@ -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?"×":"")+"</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){a.hidePanel(),a.color(t),r.execCommand("mceApplyTextcolor",a.settings.format,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?(a.hidePanel(),a.resetColor(),r.execCommand("mceRemoveTextcolor",a.settings.format)):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=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?"×":"")+"</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)})}();
|
@ -1 +1 @@
|
|||||||
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}
|
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}
|
@ -1 +1 @@
|
|||||||
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}
|
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}
|
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
4
wp-includes/js/tinymce/tinymce.min.js
vendored
4
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-43446';
|
$wp_version = '5.0-alpha-43447';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@ -18,7 +18,7 @@ $wp_db_version = 42836;
|
|||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4711-20180425';
|
$tinymce_version = '4800-20180716';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version
|
* Holds the required PHP version
|
||||||
|
Loading…
Reference in New Issue
Block a user