Skip to content
Snippets Groups Projects
Select Git revision
  • 125a4818f0239270439718bcc63b0335497e38a8
  • noblogs default
  • noblogs-5.7.1
  • upstream
  • noblogs-5.7
  • noblogs-5.6new
  • upstream5.5.1
  • noblogs28dic
  • upstream28dic
  • noblogs-5.5.1
  • noblogs-5.4.2
  • noblogs-5.4_seconda
  • noblogs-5.4
  • noblogs-7c
  • wp5.2.3p3
  • mergedbconf
  • noblogs-5.7.1
  • noblogs.5.7.0p1
  • noblogs-5.7.0
  • noblogs-5.6p3
  • noblogs5.6p2
  • noblogs-5.6p1
  • noblogs-5.6
  • noblogs-5.4.2p1
  • noblogs-5.4.2
  • noblogs-5.4.1
  • noblogs-5.4
  • noblogs-p5.4
  • noblogs-5.3.2p2
  • noblogs-5.3.2p1
  • noblogs-5.3.2
  • noblogs-5.3
  • noblogs-5.2.3p4
  • noblogs-5.2.3p3
  • noblogs-5.2.3p2
  • noblogs-5.2.3p1
36 results

editor_plugin.js

Blame
  • editor_plugin.js 1.13 KiB
    (function() {
    	tinymce.create('tinymce.plugins.VSW_Shortcode_Plugin', {
    
    		init : function(ed, url) {
    			ed.addCommand('mceVSW', function() {
    				ed.windowManager.open({
    					file : url + '/vsw_dialog.htm',
    					width : 550 + parseInt(ed.getLang('vsw.delta_width', 0)),
    					height : 230 + parseInt(ed.getLang('vsw.delta_height', 0)),
    					inline : 1
    				}, {
    					plugin_url : url, // Plugin absolute URL
    					some_custom_arg : 'custom arg' // Custom argument
    				});
    			});
    
    
    			ed.addButton('vsw', {
    				title : 'insert video shortcode',
    				cmd : 'mceVSW',
    				image : url + '/vsw.gif'
    			});
    
    
    			ed.onNodeChange.add(function(ed, cm, n) {
    				cm.setActive('vsw', n.nodeName == 'Video');
    			});
    		},
    
    		createControl : function(n, cm) {
    			return null;
    		},
    
    		
    		getInfo : function() {
    			return {
    				longname : 'Video Sidebar Widgets Shortcode Plugin',
    				author   :  'Denzel',
    				authorurl : 'http://denzeldesigns.com',
    				infourl : 'http://denzeldesigns.com',
    				version : "1.0"
    			};
    		}
    	});
    
    	// Register plugin
    	tinymce.PluginManager.add('vsw', tinymce.plugins.VSW_Shortcode_Plugin);
    })();