I would like to add custom buttons / functions to the toolbar inside a dhtmlxeditor.
Is that possible?
If yes, how would I address the toolbar object inside the editor object…?
Cheers,
Mort
Hello,
the toolbar object can be got by tb property:
editor.tb.addButton(“new”, 0, “New button”);
Thanks for your reply.
I still have trouble getting this to work.
Could you please provide a working example of how to get this working?
My code so far (Firebug message: “editor.tb is undefined”):
function doInitEditor() {
editor = new dhtmlXEditor(“editor_container”, “standard”);
editor.setIconsPath(image_path);
var tb = new dhtmlXToolbarObject(“toolbar_container”);
tb.setIconsPath(image_path);
editor.tb.addButton(“test”, 0, “Test Button 1”);
editor.init();
}
Thanks, Mort.
You can try to use the following approach:
function doInitEditor() {
editor = new dhtmlXEditor(“editor_container”, “standard”);
editor.setIconsPath(image_path);
editor.init();
editor.tb.addButton(“test”, 0, “Test Button 1”);
}
Oh man, I should have thought of that…
Thanks anyways, it works now fine!
Mort.