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

Not indented HTML code view in Editor AJAX

4 Answers 131 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Cole
Top achievements
Rank 1
Cole asked on 01 Aug 2008, 03:42 AM
I've been browsing all of the questions I can find regarding poor HTML view code formatting.

I found this response from April 08:
The RadEditor's for ASP.NET AJAX and latest editor for ASP.NET content filters automatically indent the content when you switch to HTML mode. That is why we decided to remove the Indent HTML checkbox, as the content is always indented in HTML mode.

However, the code is definitely not indented in our Editor for ASP.NET AJAX. Is there some other setting that we are missing here? The HTML view is really quite problematic.

See sample here:
<table><tbody><tr><td><img alt="Katherine Center" style="" src="/assets/psa_center.jpg">&nbsp;</td><td>&nbsp;<img alt="Sandra Cisneros" style="" src="/assets/psa_cisneros.jpg"></td><td>&nbsp;<img alt="Carolyn Forché" style="" src="/assets/psa_forche.jpg"></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table><br>

4 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 01 Aug 2008, 09:17 AM
Hi Cole,

We are not sure how you produced this code. In fact, RadEditor for ASP.NET AJAX does indent the content you have pasted quite well. You can test this using our online demos, e.g.:

http://www.telerik.com/demos/aspnet/prometheus/Editor/Examples/Default/DefaultCS.aspx


1. Please go to HTML mode
2. Paste the code you provided to get things started
3. Go back to Design mode
4. Go to HTML mode to have the editor run its content filters - and you will notice that the content has been properly indented.


Best wishes,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cole
Top achievements
Rank 1
answered on 01 Aug 2008, 01:22 PM
Tervel -

I created that sample code by building a table in the Design view of the Editor and then looking at it in HTML view.

Indeed, when I pasted into the demo, switched to Design and back to HTML, it was nicely formatted.

So...is it implementing the content filters that we've missed? Can you point me to documentation regarding this? I need to share that info so we can have ours working the same way. 
0
Rumen
Telerik team
answered on 04 Aug 2008, 07:15 AM
Hi Cole,

I am not sure why the IndentHTMLContent filter is disabled on your side, but you can easily enable it using the following codebehind:

RadEditor1.EnableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent);

Please, also make sure that you are using the latest version of RadEditor (Telerik.Web.UI.dll v2008.2.723).

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cole
Top achievements
Rank 1
answered on 15 Aug 2008, 03:35 PM
Thanks Rumen. We've got it working now.
Tags
Editor
Asked by
Cole
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Cole
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or