PK :\s mce/code/plugin.min.jsnu W+A !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();PK :\
an mce/code/plugin.jsnu W+A (function () {
var code = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var getMinWidth = function (editor) {
return editor.getParam('code_dialog_width', 600);
};
var getMinHeight = function (editor) {
return editor.getParam('code_dialog_height', Math.min(global$1.DOM.getViewPort().h - 200, 500));
};
var Settings = {
getMinWidth: getMinWidth,
getMinHeight: getMinHeight
};
var setContent = function (editor, html) {
editor.focus();
editor.undoManager.transact(function () {
editor.setContent(html);
});
editor.selection.setCursorLocation();
editor.nodeChanged();
};
var getContent = function (editor) {
return editor.getContent({ source_view: true });
};
var Content = {
setContent: setContent,
getContent: getContent
};
var open = function (editor) {
var minWidth = Settings.getMinWidth(editor);
var minHeight = Settings.getMinHeight(editor);
var win = editor.windowManager.open({
title: 'Source code',
body: {
type: 'textbox',
name: 'code',
multiline: true,
minWidth: minWidth,
minHeight: minHeight,
spellcheck: false,
style: 'direction: ltr; text-align: left'
},
onSubmit: function (e) {
Content.setContent(editor, e.data.code);
}
});
win.find('#code').value(Content.getContent(editor));
};
var Dialog = { open: open };
var register = function (editor) {
editor.addCommand('mceCodeEditor', function () {
Dialog.open(editor);
});
};
var Commands = { register: register };
var register$1 = function (editor) {
editor.addButton('code', {
icon: 'code',
tooltip: 'Source code',
onclick: function () {
Dialog.open(editor);
}
});
editor.addMenuItem('code', {
icon: 'code',
text: 'Source code',
onclick: function () {
Dialog.open(editor);
}
});
};
var Buttons = { register: register$1 };
global.add('code', function (editor) {
Commands.register(editor);
Buttons.register(editor);
return {};
});
function Plugin () {
}
return Plugin;
}());
})();
PK :\ՉB mce/wptadv/plugin.min.jsnu W+A /**
* This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
* For more information please see tinymce-advanced.php.
*
* Copyright (c) 2007-2020 Andrew Ozz. All rights reserved.
*/
( function( tinymce ) {
tinymce.PluginManager.add( 'wptadv', function( editor ) {
var noAutop = ( ! editor.settings.wpautop && editor.settings.tadv_noautop );
function addLineBreaks( html ) {
var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
html = html.replace( new RegExp( '(?:' + blocklist + ')>', 'gi' ), '$&\n' );
html = html.replace( /(
]*)?>)[\r\n\t]*/gi, '$1\n' );
html = html.replace( />\n[\r\n\t]+\n<' );
html = html.replace( /^
<\/p>)*\[caption/g, 'caption] [caption' ); event.content = event.content.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) { return match.replace( /[\r\n\t ]+/g, ' ' ); }); event.content = event.content.replace( /
]*)?>[\s\S]+?<\/pre>/g, function( match ) {
match = match.replace( /
(\r\n|\n)?/g, '\n' );
return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
});
event.content = addLineBreaks( event.content );
});
}
try {
if ( editor.plugins.searchreplace && ! editor.controlManager.buttons.searchreplace ) {
editor.shortcuts.remove( 'meta+f' );
}
} catch ( er ) {}
editor.formatter.register({
mark: { inline: 'mark' }
});
});
editor.on( 'ObjectResizeStart', function( event ) {
var element = event.target;
var table = editor.$( element );
var parentWidth;
var tableWidth;
var width;
if ( table.is( 'table' ) ) {
if ( element.style.width && element.style.width.indexOf( '%' ) !== -1 ) {
return;
}
parentWidth = parseInt( table.parent().css( 'width' ), 10 );
tableWidth = parseInt( event.width, 10 );
if ( parentWidth && tableWidth ) {
if ( Math.abs( parentWidth - tableWidth ) < 3 ) {
table.css({ width: '100%' });
} else {
width = Math.round( ( tableWidth / parentWidth ) * 100 );
if ( width > 10 && width < 200 ) {
table.css({ width: width + '%' });
}
}
}
}
}, true );
editor.addMenuItem( 'tmaresettablesize', {
text: 'Reset table size',
cmd: 'tmaResetTableSize',
icon: 'dashicon dashicons-image-flip-horizontal',
context: 'format',
});
editor.addMenuItem( 'tmaremovetablestyles', {
text: 'Remove table styling',
cmd: 'tmaRemoveTableStyles',
icon: 'dashicon dashicons-editor-table',
context: 'format',
});
editor.addButton( 'tmaresettablesize', {
title: 'Reset table size',
cmd: 'tmaResetTableSize',
icon: 'dashicon dashicons-image-flip-horizontal',
} );
editor.addButton( 'tmaremovetablestyles', {
title: 'Remove table styling',
cmd: 'tmaRemoveTableStyles',
icon: 'dashicon dashicons-editor-table',
} );
editor.addCommand( 'tmaRemoveTableStyles', function() {
var node = editor.selection.getStart();
var table = editor.dom.getParents( node, 'table' );
var attr = {
style: null,
'data-mce-style': null,
width: null,
height: null,
minWidth: null,
maxWidth: null,
minHeight: null,
maxHeight: null,
align: null,
valign: null,
axis: null,
'char': null,
charoff: null,
bgcolor: null,
border: null,
cellspacing: null,
cellpadding: null
};
if ( table ) {
editor.$( table ).attr( attr ).find( 'tr, th, td, thead, tbody, tfoot' ).each( function( i, element ) {
editor.$( element ).attr( attr );
} );
}
} );
editor.addCommand( 'tmaResetTableSize', function() {
var node = editor.selection.getStart();
var table = editor.dom.getParents( node, 'table' );
if ( table ) {
removeInlineSizes( null, table );
editor.$( table ).find( 'tr, th, td, thead, tbody, tfoot' ).each( removeInlineSizes );
}
} );
function removeInlineSizes( i, node ) {
var element = editor.$( node );
element.attr( {
width: null,
height: null,
minWidth: null,
maxWidth: null,
minHeight: null,
maxHeight: null
} );
element.css({ width: null, height: null });
if ( element.is( 'table' ) ) {
element.css({ 'border-collapse': 'collapse', width: '100%;' });
}
if ( ! element.attr( 'style' ) ) {
element.attr({ style: null, 'data-mce-style': null });
} else {
element.attr( 'data-mce-style', element.attr( 'style' ) );
}
}
if ( noAutop ) {
editor.on( 'beforeSetContent', function( event ) {
var autop;
var wp = window.wp;
if ( ! wp ) {
return;
}
autop = wp.editor && wp.editor.autop;
if ( ! autop ) {
autop = wp.oldEditor && wp.oldEditor.autop;
}
if ( event.load && autop && event.content && event.content.indexOf( '\n' ) > -1 && ! //i.test( event.content ) ) {
event.content = autop( event.content );
}
}, true );
if ( editor.settings.classic_block_editor ) {
editor.on( 'beforeGetContent', function( event ) {
if ( event.format === 'raw' ) {
return;
}
var blocks = tinymce.$( '.block-editor-block-list__block' );
if ( blocks.length === 1 && blocks.attr( 'data-type' ) === 'core/freeform' ) {
// Mark all paragraph tags inside a single freeform block so they are not stripped by the block editor...
editor.$( 'p' ).each( function ( i, node ) {
if ( ! node.hasAttributes() ) {
editor.$( node ).attr( 'data-tadv-p', 'keep' );
}
} );
} else {
// Remove the above ugliness...
editor.$( 'p[data-tadv-p]' ).removeAttr( 'data-tadv-p' );
}
}, true );
}
}
return {
addLineBreaks: addLineBreaks
};
});
}( window.tinymce ));
PK :\ՉB mce/wptadv/plugin.jsnu W+A /**
* This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
* For more information please see tinymce-advanced.php.
*
* Copyright (c) 2007-2020 Andrew Ozz. All rights reserved.
*/
( function( tinymce ) {
tinymce.PluginManager.add( 'wptadv', function( editor ) {
var noAutop = ( ! editor.settings.wpautop && editor.settings.tadv_noautop );
function addLineBreaks( html ) {
var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
html = html.replace( new RegExp( '(?:' + blocklist + ')>', 'gi' ), '$&\n' );
html = html.replace( /(
]*)?>)[\r\n\t]*/gi, '$1\n' );
html = html.replace( />\n[\r\n\t]+\n<' );
html = html.replace( /^
<\/p>)*\[caption/g, 'caption] [caption' ); event.content = event.content.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) { return match.replace( /[\r\n\t ]+/g, ' ' ); }); event.content = event.content.replace( /
]*)?>[\s\S]+?<\/pre>/g, function( match ) {
match = match.replace( /
(\r\n|\n)?/g, '\n' );
return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
});
event.content = addLineBreaks( event.content );
});
}
try {
if ( editor.plugins.searchreplace && ! editor.controlManager.buttons.searchreplace ) {
editor.shortcuts.remove( 'meta+f' );
}
} catch ( er ) {}
editor.formatter.register({
mark: { inline: 'mark' }
});
});
editor.on( 'ObjectResizeStart', function( event ) {
var element = event.target;
var table = editor.$( element );
var parentWidth;
var tableWidth;
var width;
if ( table.is( 'table' ) ) {
if ( element.style.width && element.style.width.indexOf( '%' ) !== -1 ) {
return;
}
parentWidth = parseInt( table.parent().css( 'width' ), 10 );
tableWidth = parseInt( event.width, 10 );
if ( parentWidth && tableWidth ) {
if ( Math.abs( parentWidth - tableWidth ) < 3 ) {
table.css({ width: '100%' });
} else {
width = Math.round( ( tableWidth / parentWidth ) * 100 );
if ( width > 10 && width < 200 ) {
table.css({ width: width + '%' });
}
}
}
}
}, true );
editor.addMenuItem( 'tmaresettablesize', {
text: 'Reset table size',
cmd: 'tmaResetTableSize',
icon: 'dashicon dashicons-image-flip-horizontal',
context: 'format',
});
editor.addMenuItem( 'tmaremovetablestyles', {
text: 'Remove table styling',
cmd: 'tmaRemoveTableStyles',
icon: 'dashicon dashicons-editor-table',
context: 'format',
});
editor.addButton( 'tmaresettablesize', {
title: 'Reset table size',
cmd: 'tmaResetTableSize',
icon: 'dashicon dashicons-image-flip-horizontal',
} );
editor.addButton( 'tmaremovetablestyles', {
title: 'Remove table styling',
cmd: 'tmaRemoveTableStyles',
icon: 'dashicon dashicons-editor-table',
} );
editor.addCommand( 'tmaRemoveTableStyles', function() {
var node = editor.selection.getStart();
var table = editor.dom.getParents( node, 'table' );
var attr = {
style: null,
'data-mce-style': null,
width: null,
height: null,
minWidth: null,
maxWidth: null,
minHeight: null,
maxHeight: null,
align: null,
valign: null,
axis: null,
'char': null,
charoff: null,
bgcolor: null,
border: null,
cellspacing: null,
cellpadding: null
};
if ( table ) {
editor.$( table ).attr( attr ).find( 'tr, th, td, thead, tbody, tfoot' ).each( function( i, element ) {
editor.$( element ).attr( attr );
} );
}
} );
editor.addCommand( 'tmaResetTableSize', function() {
var node = editor.selection.getStart();
var table = editor.dom.getParents( node, 'table' );
if ( table ) {
removeInlineSizes( null, table );
editor.$( table ).find( 'tr, th, td, thead, tbody, tfoot' ).each( removeInlineSizes );
}
} );
function removeInlineSizes( i, node ) {
var element = editor.$( node );
element.attr( {
width: null,
height: null,
minWidth: null,
maxWidth: null,
minHeight: null,
maxHeight: null
} );
element.css({ width: null, height: null });
if ( element.is( 'table' ) ) {
element.css({ 'border-collapse': 'collapse', width: '100%;' });
}
if ( ! element.attr( 'style' ) ) {
element.attr({ style: null, 'data-mce-style': null });
} else {
element.attr( 'data-mce-style', element.attr( 'style' ) );
}
}
if ( noAutop ) {
editor.on( 'beforeSetContent', function( event ) {
var autop;
var wp = window.wp;
if ( ! wp ) {
return;
}
autop = wp.editor && wp.editor.autop;
if ( ! autop ) {
autop = wp.oldEditor && wp.oldEditor.autop;
}
if ( event.load && autop && event.content && event.content.indexOf( '\n' ) > -1 && ! //i.test( event.content ) ) {
event.content = autop( event.content );
}
}, true );
if ( editor.settings.classic_block_editor ) {
editor.on( 'beforeGetContent', function( event ) {
if ( event.format === 'raw' ) {
return;
}
var blocks = tinymce.$( '.block-editor-block-list__block' );
if ( blocks.length === 1 && blocks.attr( 'data-type' ) === 'core/freeform' ) {
// Mark all paragraph tags inside a single freeform block so they are not stripped by the block editor...
editor.$( 'p' ).each( function ( i, node ) {
if ( ! node.hasAttributes() ) {
editor.$( node ).attr( 'data-tadv-p', 'keep' );
}
} );
} else {
// Remove the above ugliness...
editor.$( 'p[data-tadv-p]' ).removeAttr( 'data-tadv-p' );
}
}, true );
}
}
return {
addLineBreaks: addLineBreaks
};
});
}( window.tinymce ));
PK :\4b8 8 mce/contextmenu/plugin.jsnu W+A (function () {
var contextmenu = (function () {
'use strict';
var Cell = function (initial) {
var value = initial;
var get = function () {
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 (visibleState) {
var isContextMenuVisible = function () {
return visibleState.get();
};
return { isContextMenuVisible: isContextMenuVisible };
};
var Api = { get: get };
var shouldNeverUseNative = function (editor) {
return editor.settings.contextmenu_never_use_native;
};
var getContextMenu = function (editor) {
return editor.getParam('contextmenu', 'link openlink image inserttable | cell row column deletetable');
};
var Settings = {
shouldNeverUseNative: shouldNeverUseNative,
getContextMenu: getContextMenu
};
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var getUiContainer = function (editor) {
return global$1.DOM.select(editor.settings.ui_container)[0];
};
var nu = function (x, y) {
return {
x: x,
y: y
};
};
var transpose = function (pos, dx, dy) {
return nu(pos.x + dx, pos.y + dy);
};
var fromPageXY = function (e) {
return nu(e.pageX, e.pageY);
};
var fromClientXY = function (e) {
return nu(e.clientX, e.clientY);
};
var transposeUiContainer = function (element, pos) {
if (element && global$1.DOM.getStyle(element, 'position', true) !== 'static') {
var containerPos = global$1.DOM.getPos(element);
var dx = containerPos.x - element.scrollLeft;
var dy = containerPos.y - element.scrollTop;
return transpose(pos, -dx, -dy);
} else {
return transpose(pos, 0, 0);
}
};
var transposeContentAreaContainer = function (element, pos) {
var containerPos = global$1.DOM.getPos(element);
return transpose(pos, containerPos.x, containerPos.y);
};
var getPos = function (editor, e) {
if (editor.inline) {
return transposeUiContainer(getUiContainer(editor), fromPageXY(e));
} else {
var iframePos = transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));
return transposeUiContainer(getUiContainer(editor), iframePos);
}
};
var Coords = { getPos: getPos };
var global$2 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var renderMenu = function (editor, visibleState) {
var menu, contextmenu;
var items = [];
contextmenu = Settings.getContextMenu(editor);
global$3.each(contextmenu.split(/[ ,]/), function (name) {
var item = editor.menuItems[name];
if (name === '|') {
item = { text: name };
}
if (item) {
item.shortcut = '';
items.push(item);
}
});
for (var i = 0; i < items.length; i++) {
if (items[i].text === '|') {
if (i === 0 || i === items.length - 1) {
items.splice(i, 1);
}
}
}
menu = global$2.create('menu', {
items: items,
context: 'contextmenu',
classes: 'contextmenu'
});
menu.uiContainer = getUiContainer(editor);
menu.renderTo(getUiContainer(editor));
menu.on('hide', function (e) {
if (e.control === this) {
visibleState.set(false);
}
});
editor.on('remove', function () {
menu.remove();
menu = null;
});
return menu;
};
var show = function (editor, pos, visibleState, menu) {
if (menu.get() === null) {
menu.set(renderMenu(editor, visibleState));
} else {
menu.get().show();
}
menu.get().moveTo(pos.x, pos.y);
visibleState.set(true);
};
var ContextMenu = { show: show };
var isNativeOverrideKeyEvent = function (editor, e) {
return e.ctrlKey && !Settings.shouldNeverUseNative(editor);
};
var setup = function (editor, visibleState, menu) {
editor.on('contextmenu', function (e) {
if (isNativeOverrideKeyEvent(editor, e)) {
return;
}
e.preventDefault();
ContextMenu.show(editor, Coords.getPos(editor, e), visibleState, menu);
});
};
var Bind = { setup: setup };
global.add('contextmenu', function (editor) {
var menu = Cell(null), visibleState = Cell(false);
Bind.setup(editor, visibleState, menu);
return Api.get(visibleState);
});
function Plugin () {
}
return Plugin;
}());
})();
PK :\ f+> mce/contextmenu/plugin.min.jsnu W+A !function(){"use strict";var o=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return o(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return{isContextMenuVisible:function(){return t.get()}}},r=function(t){return t.settings.contextmenu_never_use_native},u=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(t){return l.DOM.select(t.settings.ui_container)[0]},a=function(t,n){return{x:t,y:n}},f=function(t,n,e){return a(t.x+n,t.y+e)},m=function(t,n){if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var e=l.DOM.getPos(t),o=e.x-t.scrollLeft,i=e.y-t.scrollTop;return f(n,-o,-i)}return f(n,0,0)},c=function(t,n){if(t.inline)return m(s(t),a((u=n).pageX,u.pageY));var e,o,i,r,u,c=(e=t.getContentAreaContainer(),o=a((r=n).clientX,r.clientY),i=l.DOM.getPos(e),f(o,i.x,i.y));return m(s(t),c)},g=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n,e,o){null===o.get()?o.set(function(e,n){var t,o,i=[];o=u(e),v.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var r=0;r