This is a migrated thread and some comments may be shown as answers.

Identify the paragraph ID

1 Answer 33 Views
Code Templates
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bibhudatta Mangaraj
Top achievements
Rank 1
bibhudatta Mangaraj asked on 18 Jan 2010, 06:54 AM
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

Sort by
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.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Code Templates
Asked by
bibhudatta Mangaraj
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or