sceditor.command.set('commandname', { exec: function() { // this is set to the editor instance this.insert('a'); }, txtExec: function() { // this is set to the editor instance this.insert('a'); }, tooltip: 'Insert the letter a' });