How can I disable FCKeditor using javascript on a particular page. I have it auto loading for all textareas, but there is one text area that I don't want to have the editor on. Is there a way in the configuration to do this?
This is using jQuery and straight javascript to accomplish this, not the best way, but flexible if you have more than one textarea on a page and you only want to disable one of them.
var fck_disable = new Array();
fck_disable[0]="resource_body";
fck_disable[1]="destination_body";
var x=0;
$("textarea").each(function(count){
var textarea_id = $(this).attr("id");
if($.inArray(textarea_id, fck_disable) == -1){
var oFCKeditor = new FCKeditor(textarea_id);
oFCKeditor.Config["EditorAreaCSS"] = '/css/screen.css' ;
oFCKeditor.BasePath = "/javascript/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
});
Re: Disabling FckEditor on a specific page
Re: Disabling FckEditor on a specific page
var fck_disable = new Array(); fck_disable[0]="resource_body"; fck_disable[1]="destination_body"; var x=0; $("textarea").each(function(count){ var textarea_id = $(this).attr("id"); if($.inArray(textarea_id, fck_disable) == -1){ var oFCKeditor = new FCKeditor(textarea_id); oFCKeditor.Config["EditorAreaCSS"] = '/css/screen.css' ; oFCKeditor.BasePath = "/javascript/fckeditor/" ; oFCKeditor.ReplaceTextarea() ; } });