<
telerik:RadEditor runat="server" ID="RadEditor1" >
<Content>
<asp:Button ID="btnSubmit2" runat="server" Text="Submit"/>
<table>
<tr>
<td><div id="EditBody1" runat="server" contentEditable="true" unselectable="off">My content area 1</div></td>
</tr>
</table>
</Content>
</telerik:RadEditor>
Thank you
Mike
5 Answers, 1 is accepted
RadEditor is web-based WYSIWYG editor that works and outputs HTML content only - it is not an iNaming container and cannot be used as such. You can access the DIV on the client only by using editor.get_document().body.getElementByID("EditBody1 ");
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
When I use the following code I keep receiving an error saying "Object doesnt support this property or method".
<
telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">
<
Content>
<table>
<tr>
<td><div id="EditBody1" runat="server" contentEditable="true" unselectable="off">My content area 1</div></td>
</tr>
</table>
</Content>
</telerik:RadEditor>
function
OnClientLoad(editor, args) {
alert(
"EditBody1: " + editor.get_document().body.getElementByID("EditBody1 "));
}
Is there anything else I need to add?
Would you please try replacing getElementByID with getElementById and test again? JavaScript is case sensitive and thus getElementByID and getElementById are different things for it and the method which actual name is without capital "D" is not found.
Greetings,
Svetlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
editor.get_document().body.getElementById(
"EditBody1")
I also tried the following as well but it did not work.
editor.get_document().body.getElementById(
"EditBody1").innerHTML
editor.get_document().getElementById(
"EditBody1").innerHTML