Dateien nach "js" hochladen

This commit is contained in:
2025-03-06 21:37:43 +00:00
parent aa6ce3d6b3
commit 457b31c3db
3 changed files with 71 additions and 0 deletions

21
js/tinymce-shortcodes.js Normal file
View File

@ -0,0 +1,21 @@
(function() {
tinymce.create('tinymce.plugins.wp_multi_shortcodes', {
init: function(editor, url) {
editor.addButton('wp_multi_shortcodes', {
type: 'menubutton',
text: 'Shortcodes',
icon: false,
menu: wpMultiShortcodes.map(function(shortcode) {
return {
text: shortcode.shortcode_name,
onclick: function() {
editor.insertContent('[' + shortcode.shortcode_name + ']');
}
};
})
});
}
});
tinymce.PluginManager.add('wp_multi_shortcodes', tinymce.plugins.wp_multi_shortcodes);
})();