PluginProbe ʕ •ᴥ•ʔ
Shortcoder — Create Shortcodes for Anything / 3.0.1
Shortcoder — Create Shortcodes for Anything v3.0.1
trunk 3.0 3.0.1 3.1 3.2 3.3 3.4 3.4.1 4.0 4.0.1 4.0.2 4.0.3 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.3 4.4 4.5 4.6 5.0 5.0.1 5.0.2 5.0.3 5.0.4 5.1 5.2 5.2.1 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.4 5.5 5.6 5.7 5.8 6.0 6.1 6.2 6.3 6.3.1 6.3.2 6.4 6.5 6.5.1 6.5.2 6.5.3
shortcoder / js / tinymce / editor_plugin.js
shortcoder / js / tinymce Last commit date
Thumbs.db 14 years ago editor_plugin.js 14 years ago icon.png 14 years ago
editor_plugin.js
56 lines
1 /*
2 * Shortcoder inserting javascript in TinyMCE editor
3 * http://www.aakashweb.com
4 * v1.1
5 * Added since WP Socializer v2.0
6 */
7 function sc_show_editor(){
8 var url = document.getElementById('sc_editorUrl').innerHTML;
9 tb_show('Insert a Shortcode', url + '?random=' + Math.random() + '&TB_iframe=1');
10 }
11
12 // For adding button in the visual editing toolbox
13 (function() {
14 tinymce.create('tinymce.plugins.SCButton', {
15
16 init : function(ed, url) {
17 ed.addButton('scbutton', {
18 title : 'Insert shortcodes created using Shortcoder',
19 image : url + '/icon.png',
20 onclick : function() {
21 sc_show_editor();
22 }
23 });
24 },
25
26 getInfo : function() {
27 return {
28 longname : 'Shortcoder',
29 author : 'Aakash Chakravarthy',
30 authorurl : 'http://www.aakashweb.com/',
31 infourl : 'http://www.aakashweb.com/',
32 version : '1.0'
33 };
34 }
35
36 });
37
38 tinymce.PluginManager.add('scbutton', tinymce.plugins.SCButton);
39 })();
40
41 // For adding button in the code editing toolbox
42
43 if(document.getElementById("ed_toolbar")){
44 qt_toolbar = document.getElementById("ed_toolbar");
45 edButtons[edButtons.length] = new edButton("ed_scbutton", "WP Socializer", "", "","");
46 var qt_button = qt_toolbar.lastChild;
47 while (qt_button.nodeType != 1){
48 qt_button = qt_button.previousSibling;
49 }
50 qt_button = qt_button.cloneNode(true);
51 qt_button.value = 'Shortcoder';
52 qt_button.title = 'Insert shortcodes created using Shortcoder';
53 qt_button.onclick = function(){ sc_show_editor(); };
54 qt_button.id = "ed_scbutton";
55 qt_toolbar.appendChild(qt_button);
56 }