Incognitobe:
Hi Adam,
thanks for the reply which sounds quite plausible and would certainly explain the error I´m getting, but I´m quite sure I got the ID right. Here´s a snippet from the html source of the table rendered by the editor (I omitted the style attribute):
<table cellspacing="0" cellpadding="0" _IsCuteEditor="True" id="CE_ctl00_mcp_te_editor_ID" >
and here is the part, where the initialize-method is called:
<img [snip] onload="window.CuteEditorInitialize('CE_ctl00_mcp_te_editor_ID',{'_ClientID':'CE_ctl00_mcp_te_editor_ID' [snip] />
so the ID does not seem to be the Problem.
The Page containing the Editor is also containing a ScriptManager control which is used for several ajax-enabled features throughout the page. Might that have something to do with it?
Thanks,
Tobias
Hi Tobias,
Please try this example on your site.
-
<%@ Page Language="C#" %>
-
-
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head runat="server">
-
<title>Untitled Page</title>
-
</head>
-
<body>
-
<form id="form1" runat="server">
-
<CE:Editor ID="Editor1" runat="server">
-
</CE:Editor>
-
<input type="button" value="Change Color" onclick="changeColor()" />
-
</form>
-
</body>
-
</html>
-
-
<script>
-
var editor1=document.getElementById("<%= Editor1.ClientID %>");
-
-
function changeColor()
-
{
-
var editdoc = editor1.GetDocument();
-
editdoc.body.style.backgroundColor="Red";
-
}
-
-
</script>
Regards,
Ken