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

Avoiding corrupted Html

1 Answer 17 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Roger Withnell
Top achievements
Rank 1
Roger Withnell asked on 07 May 2010, 04:23 PM

I used the Editor to make a simple heading of two centred lines of different text sizes.

The Html produced was:

<h1 style="text-align: center;"><span style="font-family: arial; color: #00b050;">&nbsp;  
<h2>Dinedor Cross Garage </h2> 
</span><span style="font-family: arial;">  
<h2></h2>  
</span> 
<h2></h2>  
<span style="font-family: arial;">  
<h1> 
<h3>Total care for Herefordshire Land Rover owners</h3> 
</h1> 
</span></h1

I think I started using <h1> for the first line and <h2> for the second and then changed this to <h2> and <h3>.  As you can see, the Html is a mess.

Is there a procedure you can recommend to avoid this sort of thing happening?

On a related issue, I note that when I click Enter, the Html inserted is <br/>.  This leads to problems when subsequently changing one of the "paragraphs" to a header - the whole lot changes to a header!  Wouldn't it be better for the Enter key to enter <p></p> and Shift+Enter to enter <br/>?  If so, is it possible to set the Enter key to do this?

Your help would be much appreciated.

Thanking you in anticipation.

Roger

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 12 May 2010, 12:52 PM
Hi Roger,

For the first issue I will need a step by step scenario of how to reproduce it. This is the location of our online demo, which has the latest version of the control http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx.

Regarding the second problem, in the mentioned above demo you can test New Lines as: and setting. You can set the behavior by setting the NewLineBr property: http://www.telerik.com/help/aspnet-ajax/usingthenewlinebrproperty.html


Greetings,
Stanimir
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
Roger Withnell
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or