I have created a custom webpart using a Sharepoint InputformTextBox control to enter richtext items.
I have to insert an image at the cursor position in InputformTextBox control's RichTextEditor window.
I have an image button, on click of it, I am trying to insert the image at cursor position in RTE window.But i could not get the current cursor position.
Here is the code,
protected void btnimgnew_Click(object sender, ImageClickEventArgs e)
{
string newImage = "";
txtcontent.Text = txtcontent.Text.Insert(indexPosition, newImage.ToString());
}
How to get the cursor position in InputformTextBox control's RichTextEditor window?
Thanks.