I have an Ajax HTML editor and a Dropdown above it.
On choosing an item form the Dropdown I want the Text of the selected item in the Dropdown to get pasted at the current cursor position in the AJAX HTML editor.
Any ideas..?
I have an Ajax HTML editor and a Dropdown above it. On choosing an
Share
Yeah at the end of the Third day I finally got a solution for my problem, posting it here so that someone can save there precious time from re-inventing the wheel.
This is my Ajax ATML Editor:
I want the selected text from the dropdown to be pasted at the current cursor position in the HTML editor,so I’m calling the function to insert text(InsertAtCursor) on the “change” event of the dropdown.
As a parameter to the function InsertAtCursor i’m passing the ID of the IFrame which gets created while rendering HTML editor.
This is the function which inserts Text from the dropdown at the cursor position of Ajax HTML Editor.
In my case my Ajax Editor was inside an Update panel and so after a partial post back the script stopped working, and i found help here.
Hope this works for you too…Cheers..!!