Dateien nach "js" hochladen
This commit is contained in:
21
js/tinymce-shortcodes.js
Normal file
21
js/tinymce-shortcodes.js
Normal 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);
|
||||
})();
|
Reference in New Issue
Block a user