I'm using FCKEditor 2.4 and C#.Net. I'm trying to disable an FCKEditor instance, but cannot get it to work to save my life. I understand that the only way it can be done is via Javascript, so I have the following Javascript code at the top of my aspx file:
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
window.onload=function()
{
var oEditor = FCKEditorAPI.GetInstance('AttentionFCKEditor');
oEditor.EditorDocument.body.disabled=true;
}
and here is the code for my FCKEditor control later on in the same file:
<FCKEditorV2:FCKEditor ID="AttentionFCKEditor" Value='<%# Bind("Attention") %>' Width="800px" runat="server" Height="275" BasePath="~/fckeditor/"></FCKEditorV2:FCKEditor>
When I run the app, the FCKEditor control is still enabled. Can someone tell me what I'm doing wrong?
This is a just basic code to see if disabling will even work. Ultimately, I want to disable FCKEditor controls that reside in a GridView. I want the ItemTemplate FCKEditor control to be disabled and the EditItemTemplate FCKEditor control to be enabled. If anyone has code that will do this, PLEASE forward to me! Not sure how to get the Javascript to know which instance I'm working with in the gridview.
Thanks,
Jan
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
window.onload=function()
{
var oEditor = FCKEditorAPI.GetInstance('AttentionFCKEditor');
oEditor.EditorDocument.body.disabled=true;
}
and here is the code for my FCKEditor control later on in the same file:
<FCKEditorV2:FCKEditor ID="AttentionFCKEditor" Value='<%# Bind("Attention") %>' Width="800px" runat="server" Height="275" BasePath="~/fckeditor/"></FCKEditorV2:FCKEditor>
When I run the app, the FCKEditor control is still enabled. Can someone tell me what I'm doing wrong?
This is a just basic code to see if disabling will even work. Ultimately, I want to disable FCKEditor controls that reside in a GridView. I want the ItemTemplate FCKEditor control to be disabled and the EditItemTemplate FCKEditor control to be enabled. If anyone has code that will do this, PLEASE forward to me! Not sure how to get the Javascript to know which instance I'm working with in the gridview.
Thanks,
Jan
