I'd like the content of the FCK editor to be read-only. I found the following script, but it works partially:
Does someone know how to keep the editor read-only, but with the possibility to switch from WYSIWYG view to Source view?
oEditor = FCKeditorAPI.GetInstance('MyFckEditorInstance');
if (oEditor != null) {
if (oEditor.EditorDocument != null && oEditor.EditorDocument.body != null)
oEditor.EditorDocument.body.disabled=true;
}I said it works "partially" because it makes the editor read-only, but if you switch to the "Source" view, then it is not read-only anymore.Does someone know how to keep the editor read-only, but with the possibility to switch from WYSIWYG view to Source view?

Re: FCK Editor in Read-Only / Disable mode
hi, i would like to know how to use that code u posted, please, i really doesnt know how to use it and in wich files *.js? *.php?

BTW i use PHP.
Re: FCK Editor in Read-Only / Disable mode
<%@ Control Language="C#" AutoEventWireup="true" Inherits="HtmlEditorControl" Codebehind="HtmlEditorControl.ascx.cs" %> <%@ Register TagPrefix="fck" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %> <%if (m_bReadOnly) {%> <script language="javascript"> function FCKeditor_OnComplete() { oEditor = FCKeditorAPI.GetInstance('<%=m_Editor.ClientID%>'); if (oEditor != null) { if (oEditor.EditorDocument != null && oEditor.EditorDocument.body != null) oEditor.EditorDocument.body.disabled=true; } } </script> <%}%> <fck:FCKeditor ID="m_Editor" BasePath="~/FCKeditor/" Height="400" Width="600" runat="server" />