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

Possible to retrieve the size in KB of the HTML in the editor including images?

1 Answer 29 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brian Garson
Top achievements
Rank 2
Brian Garson asked on 29 Apr 2010, 03:20 PM
I've been looking around the documentation and I'm trying to find if there exists any methods which return the HTML document size for the contents of the WYSIWYG editor, which also takes into account image sizes etc.

ie: HTML content including images is 317Kb

thanks

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 04 May 2010, 11:14 AM
Hi Brian,

RadEditor does not offer such functionality out-of-the-box and I believe there is no convenient way such feature to be implemented (it is impossible to be done client side due to restrictions to the JavaScript).

A possible approach for such implementation is:
  1. Save the content of RadEditor in an external file (or in an DataBase) and check the size in bytes of this file (field).
  2. Parse the saved content and examine the linked images using a file handler to check their size.

You can find examples of how to save the RadEditor's content to a file (or DataBase) in the following Live Demos:
Editor / Save in External File
Editor / Save in Database

Kind regards,
Dobromir
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Brian Garson
Top achievements
Rank 2
Answers by
Dobromir
Telerik team
Share this question
or