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

Is it possible to get HTML output from RadEditor?

4 Answers 222 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lakshman
Top achievements
Rank 1
Lakshman asked on 13 Feb 2009, 10:15 PM

We are upgrading Classic RadEditor to RadControls for ASP.NET AJAX 2008.31125 and I have a quick question for you.

Is it somehow possible to get HTML output from RadEditor ASP.NET AJAX 2008.31125. I know it gives out of the box XHML enabled output.

We use radeditor a lot in our application and in one of the places, we were passing classic RadEditor's output to an HTMLParser/Leadtools for drawing HTML text on images. Please let me know.

Thanks, Lakshman

4 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 16 Feb 2009, 08:13 AM
Hello Lakshman,

Please review the following online demo:
http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

You can disable all editor content filters that "fix" the browser produced content by setting
ContentFilters="None"

Thus, the content returned by the editor will not be modified in any ways - and will be as the browser produced it.

Kind regards,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Lakshman
Top achievements
Rank 1
answered on 16 Feb 2009, 03:59 PM
Thanks Travel for getting back to me right away and it worked like charm :)

Have a good day!

Lakshman
0
Lakshman
Top achievements
Rank 1
answered on 18 Feb 2009, 03:16 AM

RadEditor1.ContentFilters =

EditorFilters.None

Setting this worked on FF and IE.  For example adding Bold, Italic, Underline and Size 6, gives me this HTML on IE and FF:

<font size="6"><u><i><b>Test</b></i></u></font>

Whereas, this does not work very well on Safari and this is the output I get:

<span style="font-weight: bold;"><span style="font-style: italic;"><span style="text-decoration: underline;"><span style="font-size: xx-large;">Test</span></span></span></span>

Please let me know how can I get this fixed.

Thanks, Lakshman

 

0
Rumen
Telerik team
answered on 19 Feb 2009, 01:34 PM
Hi Lakshman,

The produced content with span tags and inline styles attributes under Safari is not generated by the RadEditor filters but by the browser itself. You have already verified this yourself by disabling the content filters after setting ContentFilters="None".

Unfortunately Safari does not offer the styleWithCSS execCommand property and it is not possible to tell the browser to produce content with <u>, <b> and <i> tags. You can see the bug tracking thread for more information: http://markmail.org/message/cmus6tgbpqn7ur6s#query:styleWithCSS%20safari+page:1+mid:uzmvj6v3rqrn3pyu+state:results

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Lakshman
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Lakshman
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or