Is there any way to 'paste html' into the current location of an editor using standard c# code instead of javascript?
For example, if I wanted to add the bold words "hello word" wherever the cursor was last positioned when I clicked an .Net button, there would be code like:
editor1.PasteHtml("<b>Hello World</b>");
or, if we could get the last cursor position using a Property like "LastCursorPosition", we could manually do it ourselves:
editor1.Text = editor1.Text.SubString(0, editor1.LastCursorPosition) + "<b>Hello World</b>" + editor1.Text.SubString(editor1.LastCursortPosition);
--------------------
I have tried PasteHTML within Javascript but running to problems for some reason. I looked at all your demos but it's just not working for me. Not sure if it has to do with the editor being inside an Ajax Update panel or something of the fact that I need to call RegisterStartUpScript because it's done on a postback? Anyway, if I could do it via server code, that would solve all my problems.