Identify the paragraph ID

2 posts, 0 answers
  1. bibhudatta Mangaraj
    bibhudatta Mangaraj avatar
    8 posts
    Member since:
    Jan 2010

    Posted 18 Jan 2010 Link to this post

    How to identify the paragraph ID on place of the curser in radeditor and how to pass it to the modal dialog?
  2. Rumen
    Rumen avatar
    12788 posts

    Posted 18 Jan 2010 Link to this post

    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

    You can see how to pass information to RadEditor's custom dialog as an argument in this article: Add Custom Dialogs.

    Best regards,
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top