Opened 11 years ago

Closed 10 years ago

#3586 closed Bug (wontfix)

Adjust the default formatting to match v2

Reported by: Alfonso Martínez de Lizarrondo Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: SVN (CKEditor) - OLD
Keywords: Pending Cc:

Description

The new output system has more options to configure the formatting, but I think that the currently default looks a little strange. The v2 code looked nicer. Compare the v3:

<p>
	This is some text<br />
	</p>

With v2:

<p>This is some text</p>
<p>&nbsp;</p>

Ignoring the <br> and the final <p>&nbsp</p>, the new version creates a new line and indents the content after the starting <p>

IMHO, v2 looked nicer and it might help migration if the existing html isn't greatly changed when edited with v3.

Change History (3)

comment:1 Changed 11 years ago by Garry Yao

Keywords: Pending added

From my discussing with Fred before, this kind of default formatting is a feature of v3 which emulate IDEs like VisualStudio, I think it's more friendly for end user.

comment:2 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Visual Studio does indeed some formatting different than V2, but the behavior in V3 doesn't match it: opening <p> is indented (or content isn't indented with regards to the tag):

<body>
    <p>
    This is a test</p>
    <br />
 
</body>

Dreamweaver CS3 applies a formatting that matches v2 instead:

<body>
<p>This is a test </p>
</body>

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: newclosed

We're trying to make things better. Actually Garry's assumption that we're totally intended to emulate VS is wrong. The only little thing we've taken from VS is that the closing </p> goes together with the text, so we avoid the extra space at the end of the paragraphs.

Instead of "This is a test", let's put some more text here, so we can compare a more real world case:

<p>
	Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed justo non
lorem commodo ultricies porta tristique velit. Fusce magna neque, tempus vulputate
condimentum sit amet, vehicula ut mauris. Ut malesuada tempus turpis, eget imperdiet
tortor dignissim dictum. Sed ut sem non risus condimentum bibendum. Donec blandit
varius aliquet. Pellentesque malesuada urna a quam molestie non porttitor mauris
mattis. Aenean in quam non ipsum faucibus imperdiet. Phasellus quis ipsum vitae
enim luctus ultrices id eu erat. Nam aliquam hendrerit arcu eu porta. Sed porta
sodales aliquet. In felis sem, faucibus in vestibulum eu, accumsan eget magna. Quisque
ut urna libero. Duis ante velit, fermentum eu luctus ut, feugiat et orci.</p>
<p>
	Nunc nisl arcu, pulvinar sed vestibulum vitae, elementum varius magna. Fusce vel
ullamcorper neque. Duis sit amet lacus nisl, non varius elit. Sed rhoncus, dui non
mollis congue, augue lorem placerat ipsum, eu molestie mi neque sed eros. In volutpat
blandit justo, sit amet cursus dolor pretium non. Phasellus ac blandit nunc. In
hac habitasse platea dictumst. Donec at nisl sed nulla sagittis ornare. Aenean in
hendrerit tortor. Aenean tincidunt, libero sed porta posuere, eros turpis porta
turpis, vel condimentum lorem sem condimentum augue. Fusce ac tortor vel quam aliquam
venenatis. Sed ante lectus, auctor a rhoncus in, vulputate eu felis. In eget lectus
velit, non varius augue. Quisque elementum risus eget nisl fermentum vehicula. Duis
sed dui sem. Donec et leo urna, sit amet interdum ligula. Quisque eleifend diam
quis velit accumsan aliquet tristique felis posuere. Integer cursus, enim tincidunt
commodo blandit, urna libero elementum mi, id imperdiet velit elit a est. Vestibulum
tortor odio, ultricies ut porttitor in, facilisis non purus.</p>
<p>
	Praesent elit libero, suscipit ut lobortis non, porta eget nisl. Sed bibendum varius
nibh, a euismod nisl pretium a. Quisque nisi nibh, venenatis sed semper id, ultricies
id dui. Morbi ornare tellus in metus dignissim vitae pretium leo hendrerit. Morbi
sed ultricies odio. Morbi a odio nunc. In hendrerit facilisis pretium. Morbi laoreet
tincidunt neque at mattis. Etiam sem quam, vestibulum eget ultrices lobortis, adipiscing
quis tortor. Quisque dictum turpis in eros accumsan molestie.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed justo non
lorem commodo ultricies porta tristique velit. Fusce magna neque, tempus vulputate
condimentum sit amet, vehicula ut mauris. Ut malesuada tempus turpis, eget imperdiet
tortor dignissim dictum. Sed ut sem non risus condimentum bibendum. Donec blandit
varius aliquet. Pellentesque malesuada urna a quam molestie non porttitor mauris
mattis. Aenean in quam non ipsum faucibus imperdiet. Phasellus quis ipsum vitae
enim luctus ultrices id eu erat. Nam aliquam hendrerit arcu eu porta. Sed porta
sodales aliquet. In felis sem, faucibus in vestibulum eu, accumsan eget magna. Quisque
ut urna libero. Duis ante velit, fermentum eu luctus ut, feugiat et orci.</p>
<p>Nunc nisl arcu, pulvinar sed vestibulum vitae, elementum varius magna. Fusce vel
ullamcorper neque. Duis sit amet lacus nisl, non varius elit. Sed rhoncus, dui non
mollis congue, augue lorem placerat ipsum, eu molestie mi neque sed eros. In volutpat
blandit justo, sit amet cursus dolor pretium non. Phasellus ac blandit nunc. In
hac habitasse platea dictumst. Donec at nisl sed nulla sagittis ornare. Aenean in
hendrerit tortor. Aenean tincidunt, libero sed porta posuere, eros turpis porta
turpis, vel condimentum lorem sem condimentum augue. Fusce ac tortor vel quam aliquam
venenatis. Sed ante lectus, auctor a rhoncus in, vulputate eu felis. In eget lectus
velit, non varius augue. Quisque elementum risus eget nisl fermentum vehicula. Duis
sed dui sem. Donec et leo urna, sit amet interdum ligula. Quisque eleifend diam
quis velit accumsan aliquet tristique felis posuere. Integer cursus, enim tincidunt
commodo blandit, urna libero elementum mi, id imperdiet velit elit a est. Vestibulum
tortor odio, ultricies ut porttitor in, facilisis non purus.</p>
<p>Praesent elit libero, suscipit ut lobortis non, porta eget nisl. Sed bibendum varius
nibh, a euismod nisl pretium a. Quisque nisi nibh, venenatis sed semper id, ultricies
id dui. Morbi ornare tellus in metus dignissim vitae pretium leo hendrerit. Morbi
sed ultricies odio. Morbi a odio nunc. In hendrerit facilisis pretium. Morbi laoreet
tincidunt neque at mattis. Etiam sem quam, vestibulum eget ultrices lobortis, adipiscing
quis tortor. Quisque dictum turpis in eros accumsan molestie.</p>

I preffer the first option, but of course this will be always subjective. The nice thing is that one can always change this behavior with V3, configuring it to match his/her preferences.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy