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

To get exact character count as in MS word

1 Answer 66 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Saurabh
Top achievements
Rank 1
Saurabh asked on 03 Apr 2012, 01:48 PM
Hi i am looking for the functionality on the client side for the Editor from which i can get the exact character count of the Characters if its in HTML mode (i.e mode = 2).
i have used

var

oValue = Editor.get_html(true).trim();    ----(a)
-In this case oValue.length is showing the result which is a count of text entered by user as well as the html tags included.
also i have tried var oValue = Editor.get_text(true).trim();     ----(b)
-In this case we are getting the plain text count text count    

eg: if i enter: B
                b
(text is bolded just to distinguish)I shud get count = 3 as we get in MS word if we check. but from (a) and (b) we get diffrent result. This is creating trouble with our QA as we are not getting things approved due to this :(. Can anybody help me on this.
  
Thanks.

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 05 Apr 2012, 03:41 PM
Hi,

In HTML mode, RadEditor has another text based content area which works and renders plain text only. You can get reference to it using editor.get_textArea().

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