How to identify the paragraph ID on place of the curser in radeditor and how to pass it to the modal dialog?
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 18 Jan 2010, 04:14 PM
Hi Bibhudatta,
You can get the selected element using the getSelectedElement() client-side method of RadEditor. Once you get a reference to it you can check its tagName and ID attribute.
var elem = editor.getSelectedElement(); //returns the selected element.
if (elem.tagName == "P") //if the selected element is paragraph
{
alert(elem.id);
}
You can see how to pass information to RadEditor's custom dialog as an argument in this article: Add Custom Dialogs.