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

Export function

2 Answers 80 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
DQ
Top achievements
Rank 1
DQ asked on 23 Jul 2012, 07:54 PM


The code below is from Dream Weaver if users type "This is a test" on the Design window:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
This is a test
</body>
</html>

And this is what RadRichTextBox exports using Frament, Inline, and DontExportStyle options:
<p style=\"text-indent: 0pt;padding: 0px 0px 0px 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;text-indent: 0px;line-height: 1.15;text-align: left;\"><span style=\"font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000;\">this is a test</span></p>

If Fragment option is not used, the export looks like a night mare on 13th street.  In my humble opinion, the export should:

Do not set any style meaning do not set font and any thing, let the viewer (whatever it is applies the default).

My question is,

Is there a way to export to Html just like Dream Weaver coding page?


Thanks.

2 Answers, 1 is accepted

Sort by
0
DQ
Top achievements
Rank 1
answered on 25 Jul 2012, 08:38 PM
HI All,

It seems to be minor thing, but it is the most important to my group, and absolutely will be the key for us to buy Telerik instead of DevExpress: We want the export to html format function of the RabRichTextBox to be efficient in size.   Meaning it should not contain anything styles( colors, fonts, etc...) that were not specified by the users.

Every single byte counts.  And we use Dream Weaver code as the guider.

Is there a way to tell RabRichTextBox to do that?  

Thanks.
0
Petya
Telerik team
answered on 26 Jul 2012, 03:43 PM
Hi DQ,

In order to ensure that the document looks as close as possible when viewed in the editor and in a browser after export, all properties are exported explicitly. We have considered adding customization options that will allow the export of "cleaner" HTML. Unfortunatelly, this hasn't been sheduled yet, so I can't engage with a timeframe.

However, RadRichTextBox is easily extensible, so you can implement a custom HTML format provider with such functionality.

Excuse us for the inconvenience.

Regards,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
DQ
Top achievements
Rank 1
Answers by
DQ
Top achievements
Rank 1
Petya
Telerik team
Share this question
or