Hi, I was wondering if there was a way to disable the editor and change it's background color(the area where you type).
I already found one way on google, but it doesn't work with firefox. In firefox you can still type.
Here is the function I am using.
This code functions fine in IE, but not firefox.
One thing I would also like to add when disabling this editor is to change the background color so user can notice that they can't type.
I am using this editor with ASP.NET
I already found one way on google, but it doesn't work with firefox. In firefox you can still type.
Here is the function I am using.
var toolbarButtonClone = null;
var toolBarSpecialComboClone = null;
function toggleEnabled(id, enabled){
var toggleElement = FCKeditorAPI.GetInstance(id);
toggleElement.EditorDocument.body.disabled = !enabled;
if(enabled)
{
toggleElement.EditorWindow.parent.FCK.ToolbarSet.Enable();
toggleElement.EditorWindow.parent.FCKToolbarButton.prototype.RefreshState = toolbarButtonClone;
toggleElement.EditorWindow.parent.FCKToolbarSpecialCombo.prototype.RefreshState = toolBarSpecialComboClone;
}
else
{
toggleElement.EditorWindow.parent.FCK.ToolbarSet.Disable();
toolbarButtonClone = toggleElement.EditorWindow.parent.FCKToolbarButton.prototype.RefreshState;
toolBarSpecialComboClone = toggleElement.EditorWindow.parent.FCKToolbarSpecialCombo.prototype.RefreshState;
toggleElement.EditorWindow.parent.FCKToolbarButton.prototype.RefreshState = function(){return false;};
toggleElement.EditorWindow.parent.FCKToolbarSpecialCombo.prototype.RefreshState = function(){return false;};
}
toggleElement.EditorWindow.parent.FCK.ToolbarSet.RefreshModeState();
}
This code functions fine in IE, but not firefox.
One thing I would also like to add when disabling this editor is to change the background color so user can notice that they can't type.
I am using this editor with ASP.NET

Re: Disable Editor and change the background color
Which version of IE, the below code works?
I have IE7 and this code still allows to edit in the editor.
Thanks.
Santosh
Re: Disable Editor and change the background color
function timmer(){ def = FCKeditorAPI.GetInstance('elm2'); def.EditorWindow.parent.FCK.ToolbarSet.Disable(); def.EditorDocument.body.disabled = true; def.EditorWindow.parent.FCKToolbarButton.prototype.RefreshState = function(){return false;}; def.EditorWindow.parent.FCKToolbarSpecialCombo.prototype.RefreshState = function(){return false;}; } setTimeout('timmer()',500);