Count Paragraph of Rad Editor

2 posts, 1 answers
  1. Siddiqali
    Siddiqali avatar
    13 posts
    Member since:
    May 2011

    Posted 10 Jan 2012 Link to this post

    Hello group member,
                                     I have form with rad editor,After entering data at the end when the user click's "Submit" button then I need to find number of paragraphs  existed in rad editor .Can any one help me how to do this. 
  2. Answer
    Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 11 Jan 2012 Link to this post

    Hello,

    You can count the paragraphs in the content area using the following code:

    editor.get_document().body.getElementsByTagName("p").length

    or

    editor.get_document().getElementsByTagName("p").length


    Kind regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

Back to Top