I want to InsertHtml using ExecCommand so it works perfect in mozilla but not works properly in chrome or safari. so is there any way to do that i want both way to do it like toggle
i want to create dropdown which consist classes so from dropdown menu i want to apply class in selected portion so if i changed dropdown option then old class should be remove and new class apply to that area.
editorDoc = editor.contentWindow.document;
function ToggleFontName(option){
var text = '<span class="+option.value+">'+editor.getSelection()+'</span>';
editorDoc.execCommand("insertHTML", false, text);
}