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

[Solved] Set a paragraph ID

1 Answer 90 Views
Editor
This is a migrated thread and some comments may be shown as answers.
bibhudatta Mangaraj
Top achievements
Rank 1
bibhudatta Mangaraj asked on 18 Jan 2010, 06:52 AM
How to identify the paragraph id on place of curser?
and how to pass the parent radediter paragraph id to the modal dialog page?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 Jan 2010, 04:21 PM
Hello 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.


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
Editor
Asked by
bibhudatta Mangaraj
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or