Hi,
I have added two buttons to DhtmlxEditor, each contains color picker.
One for text color and another for background color.
var _toolbar = _editor.tb;
_toolbar.addButton(“textColor”, 0, “”, “”, “”);
_toolbar.addButton(“bgColor”, 0, “”, “”, “”);
_toolbar.setItemToolTip(“textColor”, “Text Color”);
_toolbar.setItemToolTip(“bgColor”, “Background Color”);
_toolbar.attachEvent(“onClick”, function(id){
selectedId = id;
if(id == “bgColor” || id == “textColor”){
if(myColorPic == undefined){
myColorPic = new dhtmlXColorPicker();
myColorPic.setImagePath(“JavaScripts/dhtmlxColorPicker/codebase/imgs/”);
myColorPic.setSkin(“dhx_skyblue”);
myColorPic.init();
myColorPic.setOnSelectHandler(setColor);
}
);
If I select text in the Editor and click on color picker button, text automatically deselected and i unable to apply colors to the text entered in the Editor (In IE), but works in Mozilla.
Please give me solution
Regards,
Pavan