sincell,
For this requirement, you need to use the client side JavaScript instead of server side function. To get the caret location you need to work with selection to get it. To get the selection you can use document. Selection. In Cute Editor, we provide the following API.
editor.GetSelection=GetSelection;
Then a range from the selection can be taken by the selection object's createRange. This gives the range. Once the range is available the rest is simple calculations only. This script can be moved to a Javascript file for using in different places.
For your convenience, you should use Cute Editor API.
PasteHTML() |
This method is used for pasting the specified HTML into a range within an editor document. If anything is selected, the selection is replaced with the new HTML and text.
Example:
// get the cute editor instance var editor1 = document.getElementById('<% = Editor1.ClientID%>');
// pasting the specified HTML into a range within a editor document editor1.PasteHTML("Hello World");
|
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx