Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (12 votes)

33% thumbs up 66% thumbs down

How would you rate this answer?

Thank you for rating this answer.

How do I add a button to the DevEdit toolbar?

The first thing you want to do is edit the config.js file in the de folder. If you are using DevEdit NX, you'll be looking for the common.js file. On line 67, you'll see this:


These are the toolbar buttons. Let's add one called NewButton. Change line 67 to this:


Now open common.js and add this line at the bottom of all the case statements (around line 2027):

case 'NewButton': item    = new ToolbarButton( 'NewButton', 'New Button'     ) ; break;

You'll need to create a button called newbutton.gif and put it in the de/skins/default folder.

Next, we need to add the command. Add this line after line 2050:

c["NewButton"] = new NewButton();

Now add this code to the bottom of the common.js file:

// NewButton command
var NewButton = function(){
    this.Name = 'NewButton' ;

NewButton.prototype.execute = function(word)

ReplaceWord.prototype.getMode = function(){return OFF;}

The alert("Test"); part of the code is where you would put the JavaScript you want to execute. For information on the JavaScript API, see this link:

Related Articles

No related articles were found.


No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software