Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Regarding PasteHTML method.
Regarding PasteHTML method.
Last post 07-14-2009, 6:12 AM by
Kenneth
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
07-14-2009, 2:54 AM
53949
sanjay.joshi
Joined on 09-02-2008
Posts 82
Regarding PasteHTML method.
Reply
Quote
Hi Ken/Adam,
The method PasteHTML is inserting data at the starting position when cursor in not in the editor. Do we have any way to insert the data at the end of HTML editor for the same scenerio?
07-14-2009, 6:12 AM
53951
in reply to
53949
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