Counting characters

2 posts, 0 answers
  1. Frank
    Frank avatar
    1 posts
    Member since:
    Jun 2008

    Posted 09 Dec 2014 Link to this post

    Does anyone know if with the RTF Editor you have the ability to count the number of characters. What I need to be able to do is insert an external file and count the total characters typed into the editor minus the count of the inserted file. Also If portions of the inserted file are changed be able to add the changed characters to the total count.
  2. Ivan Petrov
    Ivan Petrov avatar
    701 posts

    Posted 12 Dec 2014 Link to this post

    Hi Frank,

    Thank you for writing.

    You can get statistics for any document that is loaded into a RadDocument instance. To get the stats for the currently opened document, you can execute the following line of code:

    The method returns a DocumentStatisticsInfo object with information on the count of pages, sections, words, characters, spaces, paragraphs and lines. 

    To get the characters for the document you are inserting insert, you can get the statistics after you import it using one of the format providers.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Ivan Petrov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top