Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Regarding PasteHTML method.
Re: Regarding PasteHTML method.
07-14-2009, 6:12 AM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Regarding PasteHTML method.
Reply
Quote
Hi sanjay.joshi,
Try this way
<%@ Page Language=
"C#"
%>
<%@ Register Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
TagPrefix=
"CE"
%>
<!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 id=
"Head1"
runat=
"server"
>
<title>Untitled Page</title>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<div>
<CE:Editor ID=
"editor1"
runat=
"server"
>
</CE:Editor>
<input type=
"button"
value=
"PasteHTML"
onclick=
"insert()"
/>
</div>
</form>
</body>
</html>
<script type=
"text/javascript"
>
function insert()
{
var editor1=document.getElementById(
'<%= editor1.ClientID%>'
);
var content = editor1.getHTML();
editor1.setHTML(
" "
);
editor1.PasteHTML(content+
"Hello World"
);
}
</script>
Regards,
ken
View Complete Thread