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

Count Paragraph of Rad Editor

1 Answer 63 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Siddiqali
Top achievements
Rank 1
Siddiqali asked on 10 Jan 2012, 08:18 AM
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. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 11 Jan 2012, 02:51 PM
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
Tags
WebParts for SharePoint
Asked by
Siddiqali
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or