Changes between Version 3 and Version 4 of Documentation/DevelopingForXinha/PluginTutorial


Ignore:
Timestamp:
07/31/08 12:11:04 (11 years ago)
Author:
colliverd
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/DevelopingForXinha/PluginTutorial

    v3 v4  
    2323                action   : function(editor) 
    2424                { 
    25                                         self.buttonPress(editor); 
     25                        self.buttonPress(editor); 
    2626                } 
    27     }) 
     27        }) 
    2828 
    2929        cfg.addToolbarElement("my-test", "inserthorizontalrule", 1); 
     
    7272        function Init() 
    7373        { 
    74                 __dlg_init(null,{width:410,height:400}); 
     74                _dlg_init(null,{width:410,height:400}); 
    7575                var Incoming = window.dialogArguments; 
    7676                alert(Incoming["FirstArg"]); 
     
    7878        } 
    7979}}}              
    80                  
     80 
     81 
     82 
     83If you want your plugin to override another plugin, for example, you may have developed an image upload facility and want to override the current !InsertImage button, you will need to modify the above code. 
     84 
     851. Remove all code from this.editor down to cfg.addToolbarElement. (lines 3 to 17 in my example) 
     86 
     872. Change !MyTest.prototype.buttonPress = function(editor) to Xinha.prototype._insertImage = function(image). 
     88     The _insertImage and function(image) will change depending on what control you will be overriding. You will be responsible for finding this information. 
     893. You still require the entry in xinha_plugins section of myconfig.js to point to your directory that you have created. 
     90 
     91 
     92 
    8193I hope this helps everyone to create a plugin and at least give some understanding. If this helps you, I would appreciate a link back to my website from your site... http://www.AshfieldFOCUS.com