TinyMCE: Update to 4.9.2

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

Fixes #46094.


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


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

File diff suppressed because it is too large Load Diff

View File

@ -1,126 +1,126 @@
(function () { (function () {
var colorpicker = (function () { var colorpicker = (function () {
'use strict'; 'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Color'); var global$1 = tinymce.util.Tools.resolve('tinymce.util.Color');
var showPreview = function (win, hexColor) { var showPreview = function (win, hexColor) {
win.find('#preview')[0].getEl().style.background = hexColor; win.find('#preview')[0].getEl().style.background = hexColor;
}; };
var setColor = function (win, value) { var setColor = function (win, value) {
var color = global$1(value), rgb = color.toRgb(); var color = global$1(value), rgb = color.toRgb();
win.fromJSON({ win.fromJSON({
r: rgb.r, r: rgb.r,
g: rgb.g, g: rgb.g,
b: rgb.b, b: rgb.b,
hex: color.toHex().substr(1) hex: color.toHex().substr(1)
}); });
showPreview(win, color.toHex()); showPreview(win, color.toHex());
}; };
var open = function (editor, callback, value) { var open = function (editor, callback, value) {
var win = editor.windowManager.open({ var win = editor.windowManager.open({
title: 'Color', title: 'Color',
items: { items: {
type: 'container', type: 'container',
layout: 'flex', layout: 'flex',
direction: 'row', direction: 'row',
align: 'stretch', align: 'stretch',
padding: 5, padding: 5,
spacing: 10, spacing: 10,
items: [ items: [
{ {
type: 'colorpicker', type: 'colorpicker',
value: value, value: value,
onchange: function () {
var rgb = this.rgb();
if (win) {
win.find('#r').value(rgb.r);
win.find('#g').value(rgb.g);
win.find('#b').value(rgb.b);
win.find('#hex').value(this.value().substr(1));
showPreview(win, this.value());
}
}
},
{
type: 'form',
padding: 0,
labelGap: 5,
defaults: {
type: 'textbox',
size: 7,
value: '0',
flex: 1,
spellcheck: false,
onchange: function () { onchange: function () {
var colorPickerCtrl = win.find('colorpicker')[0]; var rgb = this.rgb();
var name, value; if (win) {
name = this.name(); win.find('#r').value(rgb.r);
value = this.value(); win.find('#g').value(rgb.g);
if (name === 'hex') { win.find('#b').value(rgb.b);
value = '#' + value; win.find('#hex').value(this.value().substr(1));
setColor(win, value); showPreview(win, this.value());
colorPickerCtrl.value(value);
return;
} }
value = {
r: win.find('#r').value(),
g: win.find('#g').value(),
b: win.find('#b').value()
};
colorPickerCtrl.value(value);
setColor(win, value);
} }
}, },
items: [ {
{ type: 'form',
name: 'r', padding: 0,
label: 'R', labelGap: 5,
autofocus: 1 defaults: {
type: 'textbox',
size: 7,
value: '0',
flex: 1,
spellcheck: false,
onchange: function () {
var colorPickerCtrl = win.find('colorpicker')[0];
var name, value;
name = this.name();
value = this.value();
if (name === 'hex') {
value = '#' + value;
setColor(win, value);
colorPickerCtrl.value(value);
return;
}
value = {
r: win.find('#r').value(),
g: win.find('#g').value(),
b: win.find('#b').value()
};
colorPickerCtrl.value(value);
setColor(win, value);
}
}, },
{ items: [
name: 'g', {
label: 'G' name: 'r',
}, label: 'R',
{ autofocus: 1
name: 'b', },
label: 'B' {
}, name: 'g',
{ label: 'G'
name: 'hex', },
label: '#', {
value: '000000' name: 'b',
}, label: 'B'
{ },
name: 'preview', {
type: 'container', name: 'hex',
border: 1 label: '#',
} value: '000000'
] },
} {
] name: 'preview',
}, type: 'container',
onSubmit: function () { border: 1
callback('#' + win.toJSON().hex); }
]
}
]
},
onSubmit: function () {
callback('#' + win.toJSON().hex);
}
});
setColor(win, value);
};
var Dialog = { open: open };
global.add('colorpicker', function (editor) {
if (!editor.settings.color_picker_callback) {
editor.settings.color_picker_callback = function (callback, value) {
Dialog.open(editor, callback, value);
};
} }
}); });
setColor(win, value); function Plugin () {
};
var $_2gqaphanjjgwebmu = { open: open };
global.add('colorpicker', function (editor) {
if (!editor.settings.color_picker_callback) {
editor.settings.color_picker_callback = function (callback, value) {
$_2gqaphanjjgwebmu.open(editor, callback, value);
};
} }
});
function Plugin () {
}
return Plugin; return Plugin;
}()); }());
})(); })();

View File

@ -1,66 +1,66 @@
(function () { (function () {
var directionality = (function () { var directionality = (function () {
'use strict'; 'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var setDir = function (editor, dir) { var setDir = function (editor, dir) {
var dom = editor.dom; var dom = editor.dom;
var curDir; var curDir;
var blocks = editor.selection.getSelectedBlocks(); var blocks = editor.selection.getSelectedBlocks();
if (blocks.length) { if (blocks.length) {
curDir = dom.getAttrib(blocks[0], 'dir'); curDir = dom.getAttrib(blocks[0], 'dir');
global$1.each(blocks, function (block) { global$1.each(blocks, function (block) {
if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) { if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
dom.setAttrib(block, 'dir', curDir !== dir ? dir : null); dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
} }
});
editor.nodeChanged();
}
};
var Direction = { setDir: setDir };
var register = function (editor) {
editor.addCommand('mceDirectionLTR', function () {
Direction.setDir(editor, 'ltr');
}); });
editor.nodeChanged(); editor.addCommand('mceDirectionRTL', function () {
Direction.setDir(editor, 'rtl');
});
};
var Commands = { register: register };
var generateSelector = function (dir) {
var selector = [];
global$1.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
selector.push(name + '[dir=' + dir + ']');
});
return selector.join(',');
};
var register$1 = function (editor) {
editor.addButton('ltr', {
title: 'Left to right',
cmd: 'mceDirectionLTR',
stateSelector: generateSelector('ltr')
});
editor.addButton('rtl', {
title: 'Right to left',
cmd: 'mceDirectionRTL',
stateSelector: generateSelector('rtl')
});
};
var Buttons = { register: register$1 };
global.add('directionality', function (editor) {
Commands.register(editor);
Buttons.register(editor);
});
function Plugin () {
} }
};
var $_fd54yfb4jjgwebo5 = { setDir: setDir };
var register = function (editor) { return Plugin;
editor.addCommand('mceDirectionLTR', function () {
$_fd54yfb4jjgwebo5.setDir(editor, 'ltr');
});
editor.addCommand('mceDirectionRTL', function () {
$_fd54yfb4jjgwebo5.setDir(editor, 'rtl');
});
};
var $_cpb3fob3jjgwebo4 = { register: register };
var generateSelector = function (dir) {
var selector = [];
global$1.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
selector.push(name + '[dir=' + dir + ']');
});
return selector.join(',');
};
var register$1 = function (editor) {
editor.addButton('ltr', {
title: 'Left to right',
cmd: 'mceDirectionLTR',
stateSelector: generateSelector('ltr')
});
editor.addButton('rtl', {
title: 'Right to left',
cmd: 'mceDirectionRTL',
stateSelector: generateSelector('rtl')
});
};
var $_8ch9fzb6jjgwebo7 = { register: register$1 };
global.add('directionality', function (editor) {
$_cpb3fob3jjgwebo4.register(editor);
$_8ch9fzb6jjgwebo7.register(editor);
});
function Plugin () {
}
return Plugin;
}()); }());
})(); })();

View File

@ -1,177 +1,177 @@
(function () { (function () {
var fullscreen = (function () { var fullscreen = (function () {
'use strict'; 'use strict';
var Cell = function (initial) { var Cell = function (initial) {
var value = initial; var value = initial;
var get = function () { var get = function () {
return value; return value;
};
var set = function (v) {
value = v;
};
var clone = function () {
return Cell(get());
};
return {
get: get,
set: set,
clone: clone
};
};
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var get = function (fullscreenState) {
return {
isFullscreen: function () {
return fullscreenState.get() !== null;
}
};
};
var $_6qfcwucejjgwebu0 = { get: get };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var fireFullscreenStateChanged = function (editor, state) {
editor.fire('FullscreenStateChanged', { state: state });
};
var $_en5ltwcijjgwebu6 = { fireFullscreenStateChanged: fireFullscreenStateChanged };
var DOM = global$1.DOM;
var getWindowSize = function () {
var w;
var h;
var win = window;
var doc = document;
var body = doc.body;
if (body.offsetWidth) {
w = body.offsetWidth;
h = body.offsetHeight;
}
if (win.innerWidth && win.innerHeight) {
w = win.innerWidth;
h = win.innerHeight;
}
return {
w: w,
h: h
};
};
var getScrollPos = function () {
var vp = DOM.getViewPort();
return {
x: vp.x,
y: vp.y
};
};
var setScrollPos = function (pos) {
window.scrollTo(pos.x, pos.y);
};
var toggleFullscreen = function (editor, fullscreenState) {
var body = document.body;
var documentElement = document.documentElement;
var editorContainerStyle;
var editorContainer, iframe, iframeStyle;
var fullscreenInfo = fullscreenState.get();
var resize = function () {
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
};
var removeResize = function () {
DOM.unbind(window, 'resize', resize);
};
editorContainer = editor.getContainer();
editorContainerStyle = editorContainer.style;
iframe = editor.getContentAreaContainer().firstChild;
iframeStyle = iframe.style;
if (!fullscreenInfo) {
var newFullScreenInfo = {
scrollPos: getScrollPos(),
containerWidth: editorContainerStyle.width,
containerHeight: editorContainerStyle.height,
iframeWidth: iframeStyle.width,
iframeHeight: iframeStyle.height,
resizeHandler: resize,
removeHandler: removeResize
}; };
iframeStyle.width = iframeStyle.height = '100%'; var set = function (v) {
editorContainerStyle.width = editorContainerStyle.height = ''; value = v;
DOM.addClass(body, 'mce-fullscreen'); };
DOM.addClass(documentElement, 'mce-fullscreen'); var clone = function () {
DOM.addClass(editorContainer, 'mce-fullscreen'); return Cell(get());
DOM.bind(window, 'resize', resize); };
editor.on('remove', removeResize); return {
resize(); get: get,
fullscreenState.set(newFullScreenInfo); set: set,
$_en5ltwcijjgwebu6.fireFullscreenStateChanged(editor, true); clone: clone
} else { };
iframeStyle.width = fullscreenInfo.iframeWidth; };
iframeStyle.height = fullscreenInfo.iframeHeight;
if (fullscreenInfo.containerWidth) {
editorContainerStyle.width = fullscreenInfo.containerWidth;
}
if (fullscreenInfo.containerHeight) {
editorContainerStyle.height = fullscreenInfo.containerHeight;
}
DOM.removeClass(body, 'mce-fullscreen');
DOM.removeClass(documentElement, 'mce-fullscreen');
DOM.removeClass(editorContainer, 'mce-fullscreen');
setScrollPos(fullscreenInfo.scrollPos);
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null);
$_en5ltwcijjgwebu6.fireFullscreenStateChanged(editor, false);
}
};
var $_dvg07kcgjjgwebu3 = { toggleFullscreen: toggleFullscreen };
var register = function (editor, fullscreenState) { var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
editor.addCommand('mceFullScreen', function () {
$_dvg07kcgjjgwebu3.toggleFullscreen(editor, fullscreenState);
});
};
var $_bebdcrcfjjgwebu1 = { register: register };
var postRender = function (editor) { var get = function (fullscreenState) {
return function (e) { return {
var ctrl = e.control; isFullscreen: function () {
editor.on('FullscreenStateChanged', function (e) { return fullscreenState.get() !== null;
ctrl.active(e.state); }
};
};
var Api = { get: get };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var fireFullscreenStateChanged = function (editor, state) {
editor.fire('FullscreenStateChanged', { state: state });
};
var Events = { fireFullscreenStateChanged: fireFullscreenStateChanged };
var DOM = global$1.DOM;
var getWindowSize = function () {
var w;
var h;
var win = window;
var doc = document;
var body = doc.body;
if (body.offsetWidth) {
w = body.offsetWidth;
h = body.offsetHeight;
}
if (win.innerWidth && win.innerHeight) {
w = win.innerWidth;
h = win.innerHeight;
}
return {
w: w,
h: h
};
};
var getScrollPos = function () {
var vp = DOM.getViewPort();
return {
x: vp.x,
y: vp.y
};
};
var setScrollPos = function (pos) {
window.scrollTo(pos.x, pos.y);
};
var toggleFullscreen = function (editor, fullscreenState) {
var body = document.body;
var documentElement = document.documentElement;
var editorContainerStyle;
var editorContainer, iframe, iframeStyle;
var fullscreenInfo = fullscreenState.get();
var resize = function () {
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
};
var removeResize = function () {
DOM.unbind(window, 'resize', resize);
};
editorContainer = editor.getContainer();
editorContainerStyle = editorContainer.style;
iframe = editor.getContentAreaContainer().firstChild;
iframeStyle = iframe.style;
if (!fullscreenInfo) {
var newFullScreenInfo = {
scrollPos: getScrollPos(),
containerWidth: editorContainerStyle.width,
containerHeight: editorContainerStyle.height,
iframeWidth: iframeStyle.width,
iframeHeight: iframeStyle.height,
resizeHandler: resize,
removeHandler: removeResize
};
iframeStyle.width = iframeStyle.height = '100%';
editorContainerStyle.width = editorContainerStyle.height = '';
DOM.addClass(body, 'mce-fullscreen');
DOM.addClass(documentElement, 'mce-fullscreen');
DOM.addClass(editorContainer, 'mce-fullscreen');
DOM.bind(window, 'resize', resize);
editor.on('remove', removeResize);
resize();
fullscreenState.set(newFullScreenInfo);
Events.fireFullscreenStateChanged(editor, true);
} else {
iframeStyle.width = fullscreenInfo.iframeWidth;
iframeStyle.height = fullscreenInfo.iframeHeight;
if (fullscreenInfo.containerWidth) {
editorContainerStyle.width = fullscreenInfo.containerWidth;
}
if (fullscreenInfo.containerHeight) {
editorContainerStyle.height = fullscreenInfo.containerHeight;
}
DOM.removeClass(body, 'mce-fullscreen');
DOM.removeClass(documentElement, 'mce-fullscreen');
DOM.removeClass(editorContainer, 'mce-fullscreen');
setScrollPos(fullscreenInfo.scrollPos);
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null);
Events.fireFullscreenStateChanged(editor, false);
}
};
var Actions = { toggleFullscreen: toggleFullscreen };
var register = function (editor, fullscreenState) {
editor.addCommand('mceFullScreen', function () {
Actions.toggleFullscreen(editor, fullscreenState);
}); });
}; };
}; var Commands = { register: register };
var register$1 = function (editor) {
editor.addMenuItem('fullscreen', {
text: 'Fullscreen',
shortcut: 'Ctrl+Shift+F',
selectable: true,
cmd: 'mceFullScreen',
onPostRender: postRender(editor),
context: 'view'
});
editor.addButton('fullscreen', {
active: false,
tooltip: 'Fullscreen',
cmd: 'mceFullScreen',
onPostRender: postRender(editor)
});
};
var $_tne4sckjjgwebuo = { register: register$1 };
global.add('fullscreen', function (editor) { var postRender = function (editor) {
var fullscreenState = Cell(null); return function (e) {
if (editor.settings.inline) { var ctrl = e.control;
return $_6qfcwucejjgwebu0.get(fullscreenState); editor.on('FullscreenStateChanged', function (e) {
ctrl.active(e.state);
});
};
};
var register$1 = function (editor) {
editor.addMenuItem('fullscreen', {
text: 'Fullscreen',
shortcut: 'Ctrl+Shift+F',
selectable: true,
cmd: 'mceFullScreen',
onPostRender: postRender(editor),
context: 'view'
});
editor.addButton('fullscreen', {
active: false,
tooltip: 'Fullscreen',
cmd: 'mceFullScreen',
onPostRender: postRender(editor)
});
};
var Buttons = { register: register$1 };
global.add('fullscreen', function (editor) {
var fullscreenState = Cell(null);
if (editor.settings.inline) {
return Api.get(fullscreenState);
}
Commands.register(editor, fullscreenState);
Buttons.register(editor);
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
return Api.get(fullscreenState);
});
function Plugin () {
} }
$_bebdcrcfjjgwebu1.register(editor, fullscreenState);
$_tne4sckjjgwebuo.register(editor);
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
return $_6qfcwucejjgwebu0.get(fullscreenState);
});
function Plugin () {
}
return Plugin; return Plugin;
}()); }());
})(); })();

View File

@ -1,39 +1,39 @@
(function () { (function () {
var hr = (function () { var hr = (function () {
'use strict'; 'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var register = function (editor) { var register = function (editor) {
editor.addCommand('InsertHorizontalRule', function () { editor.addCommand('InsertHorizontalRule', function () {
editor.execCommand('mceInsertContent', false, '<hr />'); editor.execCommand('mceInsertContent', false, '<hr />');
});
};
var Commands = { register: register };
var register$1 = function (editor) {
editor.addButton('hr', {
icon: 'hr',
tooltip: 'Horizontal line',
cmd: 'InsertHorizontalRule'
});
editor.addMenuItem('hr', {
icon: 'hr',
text: 'Horizontal line',
cmd: 'InsertHorizontalRule',
context: 'insert'
});
};
var Buttons = { register: register$1 };
global.add('hr', function (editor) {
Commands.register(editor);
Buttons.register(editor);
}); });
}; function Plugin () {
var $_cqh592cnjjgwebvk = { register: register }; }
var register$1 = function (editor) { return Plugin;
editor.addButton('hr', {
icon: 'hr',
tooltip: 'Horizontal line',
cmd: 'InsertHorizontalRule'
});
editor.addMenuItem('hr', {
icon: 'hr',
text: 'Horizontal line',
cmd: 'InsertHorizontalRule',
context: 'insert'
});
};
var $_13g834cojjgwebvl = { register: register$1 };
global.add('hr', function (editor) {
$_cqh592cnjjgwebvk.register(editor);
$_13g834cojjgwebvl.register(editor);
});
function Plugin () {
}
return Plugin;
}()); }());
})(); })();

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 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 it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,124 +1,124 @@
(function () { (function () {
var tabfocus = (function () { var tabfocus = (function () {
'use strict'; 'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager'); var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
var global$3 = tinymce.util.Tools.resolve('tinymce.Env'); var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay'); var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay');
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var global$6 = tinymce.util.Tools.resolve('tinymce.util.VK'); var global$6 = tinymce.util.Tools.resolve('tinymce.util.VK');
var getTabFocusElements = function (editor) { var getTabFocusElements = function (editor) {
return editor.getParam('tabfocus_elements', ':prev,:next'); return editor.getParam('tabfocus_elements', ':prev,:next');
}; };
var getTabFocus = function (editor) { var getTabFocus = function (editor) {
return editor.getParam('tab_focus', getTabFocusElements(editor)); return editor.getParam('tab_focus', getTabFocusElements(editor));
}; };
var $_8rita4kwjjgwed4m = { getTabFocus: getTabFocus }; var Settings = { getTabFocus: getTabFocus };
var DOM = global$1.DOM; var DOM = global$1.DOM;
var tabCancel = function (e) { var tabCancel = function (e) {
if (e.keyCode === global$6.TAB && !e.ctrlKey && !e.altKey && !e.metaKey) { if (e.keyCode === global$6.TAB && !e.ctrlKey && !e.altKey && !e.metaKey) {
e.preventDefault();
}
};
var setup = function (editor) {
function tabHandler(e) {
var x, el, v, i;
if (e.keyCode !== global$6.TAB || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
return;
}
function find(direction) {
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
function canSelectRecursive(e) {
return e.nodeName === 'BODY' || e.type !== 'hidden' && e.style.display !== 'none' && e.style.visibility !== 'hidden' && canSelectRecursive(e.parentNode);
}
function canSelect(el) {
return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && global$2.get(e.id) && el.tabIndex !== -1 && canSelectRecursive(el);
}
global$5.each(el, function (e, i) {
if (e.id === editor.id) {
x = i;
return false;
}
});
if (direction > 0) {
for (i = x + 1; i < el.length; i++) {
if (canSelect(el[i])) {
return el[i];
}
}
} else {
for (i = x - 1; i >= 0; i--) {
if (canSelect(el[i])) {
return el[i];
}
}
}
return null;
}
v = global$5.explode($_8rita4kwjjgwed4m.getTabFocus(editor));
if (v.length === 1) {
v[1] = v[0];
v[0] = ':prev';
}
if (e.shiftKey) {
if (v[0] === ':prev') {
el = find(-1);
} else {
el = DOM.get(v[0]);
}
} else {
if (v[1] === ':next') {
el = find(1);
} else {
el = DOM.get(v[1]);
}
}
if (el) {
var focusEditor = global$2.get(el.id || el.name);
if (el.id && focusEditor) {
focusEditor.focus();
} else {
global$4.setTimeout(function () {
if (!global$3.webkit) {
window.focus();
}
el.focus();
}, 10);
}
e.preventDefault(); e.preventDefault();
} }
} };
editor.on('init', function () { var setup = function (editor) {
if (editor.inline) { function tabHandler(e) {
DOM.setAttrib(editor.getBody(), 'tabIndex', null); var x, el, v, i;
} if (e.keyCode !== global$6.TAB || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
editor.on('keyup', tabCancel); return;
if (global$3.gecko) { }
editor.on('keypress keydown', tabHandler); function find(direction) {
} else { el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
editor.on('keydown', tabHandler); function canSelectRecursive(e) {
return e.nodeName === 'BODY' || e.type !== 'hidden' && e.style.display !== 'none' && e.style.visibility !== 'hidden' && canSelectRecursive(e.parentNode);
}
function canSelect(el) {
return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && global$2.get(e.id) && el.tabIndex !== -1 && canSelectRecursive(el);
}
global$5.each(el, function (e, i) {
if (e.id === editor.id) {
x = i;
return false;
}
});
if (direction > 0) {
for (i = x + 1; i < el.length; i++) {
if (canSelect(el[i])) {
return el[i];
}
}
} else {
for (i = x - 1; i >= 0; i--) {
if (canSelect(el[i])) {
return el[i];
}
}
}
return null;
}
v = global$5.explode(Settings.getTabFocus(editor));
if (v.length === 1) {
v[1] = v[0];
v[0] = ':prev';
}
if (e.shiftKey) {
if (v[0] === ':prev') {
el = find(-1);
} else {
el = DOM.get(v[0]);
}
} else {
if (v[1] === ':next') {
el = find(1);
} else {
el = DOM.get(v[1]);
}
}
if (el) {
var focusEditor = global$2.get(el.id || el.name);
if (el.id && focusEditor) {
focusEditor.focus();
} else {
global$4.setTimeout(function () {
if (!global$3.webkit) {
window.focus();
}
el.focus();
}, 10);
}
e.preventDefault();
}
} }
editor.on('init', function () {
if (editor.inline) {
DOM.setAttrib(editor.getBody(), 'tabIndex', null);
}
editor.on('keyup', tabCancel);
if (global$3.gecko) {
editor.on('keypress keydown', tabHandler);
} else {
editor.on('keydown', tabHandler);
}
});
};
var Keyboard = { setup: setup };
global.add('tabfocus', function (editor) {
Keyboard.setup(editor);
}); });
}; function Plugin () {
var $_6zogdykpjjgwed4h = { setup: setup }; }
global.add('tabfocus', function (editor) { return Plugin;
$_6zogdykpjjgwed4h.setup(editor);
});
function Plugin () {
}
return Plugin;
}()); }());
})(); })();

View File

@ -1,346 +1,346 @@
(function () { (function () {
var textcolor = (function () { var textcolor = (function () {
'use strict'; 'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var getCurrentColor = function (editor, format) { var getCurrentColor = function (editor, format) {
var color; var color;
editor.dom.getParents(editor.selection.getStart(), function (elm) { editor.dom.getParents(editor.selection.getStart(), function (elm) {
var value; var value;
if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) { if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) {
color = value; color = color ? color : value;
} }
});
return color;
};
var mapColors = function (colorMap) {
var i;
var colors = [];
for (i = 0; i < colorMap.length; i += 2) {
colors.push({
text: colorMap[i + 1],
color: '#' + colorMap[i]
}); });
} return color;
return colors;
};
var applyFormat = function (editor, format, value) {
editor.undoManager.transact(function () {
editor.focus();
editor.formatter.apply(format, { value: value });
editor.nodeChanged();
});
};
var removeFormat = function (editor, format) {
editor.undoManager.transact(function () {
editor.focus();
editor.formatter.remove(format, { value: null }, null, true);
editor.nodeChanged();
});
};
var $_b0p88yrijjgwefd2 = {
getCurrentColor: getCurrentColor,
mapColors: mapColors,
applyFormat: applyFormat,
removeFormat: removeFormat
};
var register = function (editor) {
editor.addCommand('mceApplyTextcolor', function (format, value) {
$_b0p88yrijjgwefd2.applyFormat(editor, format, value);
});
editor.addCommand('mceRemoveTextcolor', function (format) {
$_b0p88yrijjgwefd2.removeFormat(editor, format);
});
};
var $_g2o2pirhjjgwefd1 = { register: register };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var defaultColorMap = [
'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'
];
var getTextColorMap = function (editor) {
return editor.getParam('textcolor_map', defaultColorMap);
};
var getForeColorMap = function (editor) {
return editor.getParam('forecolor_map', getTextColorMap(editor));
};
var getBackColorMap = function (editor) {
return editor.getParam('backcolor_map', getTextColorMap(editor));
};
var getTextColorRows = function (editor) {
return editor.getParam('textcolor_rows', 5);
};
var getTextColorCols = function (editor) {
return editor.getParam('textcolor_cols', 8);
};
var getForeColorRows = function (editor) {
return editor.getParam('forecolor_rows', getTextColorRows(editor));
};
var getBackColorRows = function (editor) {
return editor.getParam('backcolor_rows', getTextColorRows(editor));
};
var getForeColorCols = function (editor) {
return editor.getParam('forecolor_cols', getTextColorCols(editor));
};
var getBackColorCols = function (editor) {
return editor.getParam('backcolor_cols', getTextColorCols(editor));
};
var getColorPickerCallback = function (editor) {
return editor.getParam('color_picker_callback', null);
};
var hasColorPicker = function (editor) {
return typeof getColorPickerCallback(editor) === 'function';
};
var $_2rfqb7rmjjgwefd9 = {
getForeColorMap: getForeColorMap,
getBackColorMap: getBackColorMap,
getForeColorRows: getForeColorRows,
getBackColorRows: getBackColorRows,
getForeColorCols: getForeColorCols,
getBackColorCols: getBackColorCols,
getColorPickerCallback: getColorPickerCallback,
hasColorPicker: hasColorPicker
};
var global$3 = tinymce.util.Tools.resolve('tinymce.util.I18n');
var getHtml = function (cols, rows, colorMap, hasColorPicker) {
var colors, color, html, last, x, y, i, count = 0;
var id = global$1.DOM.uniqueId('mcearia');
var getColorCellHtml = function (color, title) {
var isNoColor = color === 'transparent';
return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>';
}; };
colors = $_b0p88yrijjgwefd2.mapColors(colorMap); var mapColors = function (colorMap) {
colors.push({ var i;
text: global$3.translate('No color'), var colors = [];
color: 'transparent' for (i = 0; i < colorMap.length; i += 2) {
}); colors.push({
html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>'; text: colorMap[i + 1],
last = colors.length - 1; color: '#' + colorMap[i]
for (y = 0; y < rows; y++) { });
html += '<tr>';
for (x = 0; x < cols; x++) {
i = y * cols + x;
if (i > last) {
html += '<td></td>';
} else {
color = colors[i];
html += getColorCellHtml(color.color, color.text);
}
}
html += '</tr>';
}
if (hasColorPicker) {
html += '<tr>' + '<td colspan="' + cols + '" class="mce-custom-color-btn">' + '<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' + 'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' + '<button type="button" role="presentation" tabindex="-1">' + global$3.translate('Custom...') + '</button>' + '</div>' + '</td>' + '</tr>';
html += '<tr>';
for (x = 0; x < cols; x++) {
html += getColorCellHtml('', 'Custom color');
}
html += '</tr>';
}
html += '</tbody></table>';
return html;
};
var $_fihh7qrnjjgwefdb = { getHtml: getHtml };
var setDivColor = function setDivColor(div, value) {
div.style.background = value;
div.setAttribute('data-mce-color', value);
};
var onButtonClick = function (editor) {
return function (e) {
var ctrl = e.control;
if (ctrl._color) {
editor.execCommand('mceApplyTextcolor', ctrl.settings.format, ctrl._color);
} else {
editor.execCommand('mceRemoveTextcolor', ctrl.settings.format);
} }
return colors;
}; };
}; var applyFormat = function (editor, format, value) {
var onPanelClick = function (editor, cols) { editor.undoManager.transact(function () {
return function (e) { editor.focus();
var buttonCtrl = this.parent(); editor.formatter.apply(format, { value: value });
var value; editor.nodeChanged();
var currentColor = $_b0p88yrijjgwefd2.getCurrentColor(editor, buttonCtrl.settings.format); });
var selectColor = function (value) { };
editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value); var removeFormat = function (editor, format) {
buttonCtrl.hidePanel(); editor.undoManager.transact(function () {
buttonCtrl.color(value); editor.focus();
editor.formatter.remove(format, { value: null }, null, true);
editor.nodeChanged();
});
};
var TextColor = {
getCurrentColor: getCurrentColor,
mapColors: mapColors,
applyFormat: applyFormat,
removeFormat: removeFormat
};
var register = function (editor) {
editor.addCommand('mceApplyTextcolor', function (format, value) {
TextColor.applyFormat(editor, format, value);
});
editor.addCommand('mceRemoveTextcolor', function (format) {
TextColor.removeFormat(editor, format);
});
};
var Commands = { register: register };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var defaultColorMap = [
'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'
];
var getTextColorMap = function (editor) {
return editor.getParam('textcolor_map', defaultColorMap);
};
var getForeColorMap = function (editor) {
return editor.getParam('forecolor_map', getTextColorMap(editor));
};
var getBackColorMap = function (editor) {
return editor.getParam('backcolor_map', getTextColorMap(editor));
};
var getTextColorRows = function (editor) {
return editor.getParam('textcolor_rows', 5);
};
var getTextColorCols = function (editor) {
return editor.getParam('textcolor_cols', 8);
};
var getForeColorRows = function (editor) {
return editor.getParam('forecolor_rows', getTextColorRows(editor));
};
var getBackColorRows = function (editor) {
return editor.getParam('backcolor_rows', getTextColorRows(editor));
};
var getForeColorCols = function (editor) {
return editor.getParam('forecolor_cols', getTextColorCols(editor));
};
var getBackColorCols = function (editor) {
return editor.getParam('backcolor_cols', getTextColorCols(editor));
};
var getColorPickerCallback = function (editor) {
return editor.getParam('color_picker_callback', null);
};
var hasColorPicker = function (editor) {
return typeof getColorPickerCallback(editor) === 'function';
};
var Settings = {
getForeColorMap: getForeColorMap,
getBackColorMap: getBackColorMap,
getForeColorRows: getForeColorRows,
getBackColorRows: getBackColorRows,
getForeColorCols: getForeColorCols,
getBackColorCols: getBackColorCols,
getColorPickerCallback: getColorPickerCallback,
hasColorPicker: hasColorPicker
};
var global$3 = tinymce.util.Tools.resolve('tinymce.util.I18n');
var getHtml = function (cols, rows, colorMap, hasColorPicker) {
var colors, color, html, last, x, y, i, count = 0;
var id = global$1.DOM.uniqueId('mcearia');
var getColorCellHtml = function (color, title) {
var isNoColor = color === 'transparent';
return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>';
}; };
var resetColor = function () { colors = TextColor.mapColors(colorMap);
editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format); colors.push({
buttonCtrl.hidePanel(); text: global$3.translate('No color'),
buttonCtrl.resetColor(); color: 'transparent'
}; });
if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) { html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
buttonCtrl.hidePanel(); last = colors.length - 1;
var colorPickerCallback = $_2rfqb7rmjjgwefd9.getColorPickerCallback(editor); for (y = 0; y < rows; y++) {
colorPickerCallback.call(editor, function (value) { html += '<tr>';
var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0]; for (x = 0; x < cols; x++) {
var customColorCells, div, i; i = y * cols + x;
customColorCells = global$2.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function (elm) { if (i > last) {
return elm.firstChild; html += '<td></td>';
}); } else {
for (i = 0; i < customColorCells.length; i++) { color = colors[i];
div = customColorCells[i]; html += getColorCellHtml(color.color, color.text);
if (!div.getAttribute('data-mce-color')) {
break;
}
} }
if (i === cols) {
for (i = 0; i < cols - 1; i++) {
setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
}
}
setDivColor(div, value);
selectColor(value);
}, currentColor);
}
value = e.target.getAttribute('data-mce-color');
if (value) {
if (this.lastId) {
global$1.DOM.get(this.lastId).setAttribute('aria-selected', 'false');
} }
e.target.setAttribute('aria-selected', true); html += '</tr>';
this.lastId = e.target.id; }
if (value === 'transparent') { if (hasColorPicker) {
resetColor(); html += '<tr>' + '<td colspan="' + cols + '" class="mce-custom-color-btn">' + '<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' + 'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' + '<button type="button" role="presentation" tabindex="-1">' + global$3.translate('Custom...') + '</button>' + '</div>' + '</td>' + '</tr>';
html += '<tr>';
for (x = 0; x < cols; x++) {
html += getColorCellHtml('', 'Custom color');
}
html += '</tr>';
}
html += '</tbody></table>';
return html;
};
var ColorPickerHtml = { getHtml: getHtml };
var setDivColor = function setDivColor(div, value) {
div.style.background = value;
div.setAttribute('data-mce-color', value);
};
var onButtonClick = function (editor) {
return function (e) {
var ctrl = e.control;
if (ctrl._color) {
editor.execCommand('mceApplyTextcolor', ctrl.settings.format, ctrl._color);
} else { } else {
selectColor(value); editor.execCommand('mceRemoveTextcolor', ctrl.settings.format);
} }
} else if (value !== null) { };
buttonCtrl.hidePanel();
}
}; };
}; var onPanelClick = function (editor, cols) {
var renderColorPicker = function (editor, foreColor) { return function (e) {
return function () { var buttonCtrl = this.parent();
var cols = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorCols(editor) : $_2rfqb7rmjjgwefd9.getBackColorCols(editor); var value;
var rows = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorRows(editor) : $_2rfqb7rmjjgwefd9.getBackColorRows(editor); var currentColor = TextColor.getCurrentColor(editor, buttonCtrl.settings.format);
var colorMap = foreColor ? $_2rfqb7rmjjgwefd9.getForeColorMap(editor) : $_2rfqb7rmjjgwefd9.getBackColorMap(editor); var selectColor = function (value) {
var hasColorPicker = $_2rfqb7rmjjgwefd9.hasColorPicker(editor); editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
return $_fihh7qrnjjgwefdb.getHtml(cols, rows, colorMap, hasColorPicker); buttonCtrl.hidePanel();
buttonCtrl.color(value);
};
var resetColor = function () {
editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format);
buttonCtrl.hidePanel();
buttonCtrl.resetColor();
};
if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) {
buttonCtrl.hidePanel();
var colorPickerCallback = Settings.getColorPickerCallback(editor);
colorPickerCallback.call(editor, function (value) {
var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
var customColorCells, div, i;
customColorCells = global$2.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function (elm) {
return elm.firstChild;
});
for (i = 0; i < customColorCells.length; i++) {
div = customColorCells[i];
if (!div.getAttribute('data-mce-color')) {
break;
}
}
if (i === cols) {
for (i = 0; i < cols - 1; i++) {
setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
}
}
setDivColor(div, value);
selectColor(value);
}, currentColor);
}
value = e.target.getAttribute('data-mce-color');
if (value) {
if (this.lastId) {
global$1.DOM.get(this.lastId).setAttribute('aria-selected', 'false');
}
e.target.setAttribute('aria-selected', true);
this.lastId = e.target.id;
if (value === 'transparent') {
resetColor();
} else {
selectColor(value);
}
} else if (value !== null) {
buttonCtrl.hidePanel();
}
};
}; };
}; var renderColorPicker = function (editor, foreColor) {
var register$1 = function (editor) { return function () {
editor.addButton('forecolor', { var cols = foreColor ? Settings.getForeColorCols(editor) : Settings.getBackColorCols(editor);
type: 'colorbutton', var rows = foreColor ? Settings.getForeColorRows(editor) : Settings.getBackColorRows(editor);
tooltip: 'Text color', var colorMap = foreColor ? Settings.getForeColorMap(editor) : Settings.getBackColorMap(editor);
format: 'forecolor', var hasColorPicker = Settings.hasColorPicker(editor);
panel: { return ColorPickerHtml.getHtml(cols, rows, colorMap, hasColorPicker);
role: 'application', };
ariaRemember: true, };
html: renderColorPicker(editor, true), var register$1 = function (editor) {
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.getForeColorCols(editor)) editor.addButton('forecolor', {
}, type: 'colorbutton',
onclick: onButtonClick(editor) tooltip: 'Text color',
}); format: 'forecolor',
editor.addButton('backcolor', { panel: {
type: 'colorbutton', role: 'application',
tooltip: 'Background color', ariaRemember: true,
format: 'hilitecolor', html: renderColorPicker(editor, true),
panel: { onclick: onPanelClick(editor, Settings.getForeColorCols(editor))
role: 'application', },
ariaRemember: true, onclick: onButtonClick(editor)
html: renderColorPicker(editor, false), });
onclick: onPanelClick(editor, $_2rfqb7rmjjgwefd9.getBackColorCols(editor)) editor.addButton('backcolor', {
}, type: 'colorbutton',
onclick: onButtonClick(editor) tooltip: 'Background color',
}); format: 'hilitecolor',
}; panel: {
var $_8npvswrjjjgwefd5 = { register: register$1 }; role: 'application',
ariaRemember: true,
html: renderColorPicker(editor, false),
onclick: onPanelClick(editor, Settings.getBackColorCols(editor))
},
onclick: onButtonClick(editor)
});
};
var Buttons = { register: register$1 };
global.add('textcolor', function (editor) { global.add('textcolor', function (editor) {
$_g2o2pirhjjgwefd1.register(editor); Commands.register(editor);
$_8npvswrjjjgwefd5.register(editor); Buttons.register(editor);
}); });
function Plugin () { function Plugin () {
} }
return Plugin; return Plugin;
}()); }());
})(); })();

View File

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

View File

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

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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