first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
(function($) {
if ( typeof widgetShortcodeTinyMCE === 'undefined' )
return;
if ( widgetShortcodeTinyMCE.widgets.length < 1 )
return;
tinymce.PluginManager.add( 'widgetShortcode', function( editor, url ) {
var items = [];
$.each( widgetShortcodeTinyMCE.widgets, function( i, v ) {
var item = {
'text' : v.label,
'body': {
'type': v.label
},
'onclick' : function(){
editor.insertContent( '[widget id="' + v.value + '"]' );
}
};
items.push( item );
} );
editor.addButton( 'widgetShortcode', {
title: widgetShortcodeTinyMCE.title,
type : 'menubutton',
image : widgetShortcodeTinyMCE.image,
menu : items
});
});
})(jQuery);