Hi
I am trying to change the mode of my radeditor to read only using client-side code. I did try modifying the enableEditing property but got the same result. On loading my page I want to be able to check the value of a hidden field and if it is 1 then set the editor into preview mode. If the hidden field is 0 then the editor should go into edit mode. I haven't got that far because the editor is giving inconsistent results. I can't get past just unconditionally setting the mode. Sometimes it works and sometimes I get the error in this thread title. It looks like the editor hasn't fully loaded in time for my onload javascript function. The relevant code is below. Please advise.
I am trying to change the mode of my radeditor to read only using client-side code. I did try modifying the enableEditing property but got the same result. On loading my page I want to be able to check the value of a hidden field and if it is 1 then set the editor into preview mode. If the hidden field is 0 then the editor should go into edit mode. I haven't got that far because the editor is giving inconsistent results. I can't get past just unconditionally setting the mode. Sometimes it works and sometimes I get the error in this thread title. It looks like the editor hasn't fully loaded in time for my onload javascript function. The relevant code is below. Please advise.
thx Michael
<body onload="LoadPage();">
function LoadPage()
var editor = $find("<%=txtVisitNotes.ClientID%>");
editor.set_mode(1);
}