Great everything looks good except when I click on the "Insert templates" the template isn't copied to the editor just says Hello.
The code is as follows:
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
Literal1.Text = "<h2>The HTML you typed is...</h2><br>";
Literal1.Text += Server.HtmlEncode(Editor1.Text);
}
else
{
Editor1.Text = "Type Here";
}
}
public void Submit(object sender, System.EventArgs e)
{
Literal1.Text = "<h2>The HTML you typed is...</h2><br>";
Literal1.Text += Server.HtmlEncode(Editor1.Text);
}
</script>
<script>
_EditorOnLoad();
function _EditorOnLoad()
{
// get the cute editor instance
var editor1 = document.getElementById('<%=Editor1.ClientID%>');
editor1.ExecCommand("InsertTemplate");
//Get the editor content
var editdoc=editor1.GetDocument();
if(!editdoc.body) //Not Ready
{
setTimeout(_EditorOnLoad,10);
return;
}
else
{
// Set the editor
editor1.setHTML("Hello");
}
}
</script>
Thanks,
Bill