editor_plugin.js
37 lines
| 1 | /* |
| 2 | * Shortcoder TinyMCE plugin for inserting Shortcodes |
| 3 | * http://www.aakashweb.com |
| 4 | * v1.2 |
| 5 | * Added since WP Socializer v2.0 |
| 6 | */ |
| 7 | |
| 8 | // For adding button in the visual editing toolbox |
| 9 | (function() { |
| 10 | |
| 11 | tinymce.create('tinymce.plugins.SCButton', { |
| 12 | |
| 13 | init : function(ed, url) { |
| 14 | ed.addButton('scbutton', { |
| 15 | title : 'Insert shortcodes created using Shortcoder', |
| 16 | image : url + '/icon.png', |
| 17 | onclick : function() { |
| 18 | if( typeof sc_show_insert !== 'undefined' ) sc_show_insert(); |
| 19 | } |
| 20 | }); |
| 21 | }, |
| 22 | |
| 23 | getInfo : function() { |
| 24 | return { |
| 25 | longname : 'Shortcoder', |
| 26 | author : 'Aakash Chakravarthy', |
| 27 | authorurl : 'http://www.aakashweb.com/', |
| 28 | infourl : 'http://www.aakashweb.com/', |
| 29 | version : '1.2' |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | }); |
| 34 | |
| 35 | tinymce.PluginManager.add('scbutton', tinymce.plugins.SCButton); |
| 36 | |
| 37 | })(); |