editor_plugin.js
33 lines
| 1 | /* |
| 2 | * Shortcoder TinyMCE plugin for inserting Shortcodes |
| 3 | */ |
| 4 | |
| 5 | (function() { |
| 6 | |
| 7 | tinymce.create( 'tinymce.plugins.SCButton',{ |
| 8 | |
| 9 | init : function( ed, url ){ |
| 10 | ed.addButton( 'shortcoder', { |
| 11 | title : 'Insert shortcodes created using Shortcoder', |
| 12 | image : url + '/icon.png', |
| 13 | onclick : function() { |
| 14 | if( typeof sc_show_insert !== 'undefined' ) sc_show_insert(); |
| 15 | } |
| 16 | }); |
| 17 | }, |
| 18 | |
| 19 | getInfo : function() { |
| 20 | return { |
| 21 | longname : 'Shortcoder', |
| 22 | author : 'Aakash Chakravarthy', |
| 23 | authorurl : 'https://www.aakashweb.com/', |
| 24 | infourl : 'https://www.aakashweb.com/', |
| 25 | version : '1.3' |
| 26 | }; |
| 27 | } |
| 28 | |
| 29 | }); |
| 30 | |
| 31 | tinymce.PluginManager.add( 'shortcoder', tinymce.plugins.SCButton ); |
| 32 | |
| 33 | })(); |