Download KTML-API Documentation
Transcript
KTML-API Documentation
ktml_cont_cnt.addToolbarButton(customToolbarButton);
There are two ways of adding a button:
1. Adding the button after it was created.
First, you create the button:
var
btnInsertCustomHTML=new
ToolbarButton
("expandSelectionToParentNode", "expandSelectionToParentNode",
"expandselectiontoparentnode",
null,
null,
"img",
null,
KT_JS_STRING,
'this.ktml.insertHTML(prompt("Enter
the
text!","Text"));');
Then, you add it:
ktml_cont_cnt.addToolbarButton(btnInsertCustomHTML);
2. Create the button and adding it in the same time.
ktml_cont_cnt.addToolbarButton(new
ToolbarButton
("expandSelectionToParentNode", "expandSelectionToParentNode",
"expandselectiontoparentnode",
null,
null,
"img",
null,
KT_JS_STRING,
'this.ktml.insertHTML(prompt("Enter
the
text!","Text"));'));
After having inserted a code bloc similar to one of the ones presented above, the newly created button will be
displayed in the KTML toolbar.
http://www.interaktonline.com
Page 22