Opened 17 years ago

Closed 17 years ago

Last modified 14 years ago

#172 closed Bug (fixed)

Cannot apply format to a select list of bullets

Reported by: andyrudmik@… Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: Core : Styles Version: FCKeditor 2.4
Keywords: SF Confirmed Cc:

Description

  1. Create a list of bullets:
<ol>
	<li>Bullet 1</li>
	<li>Bullet 2</li>
	<li>Bullet 3</li>
</ol>
  1. Select bullets in WYSIWYG view.
  1. Select Normal from Format drop down menu.
  1. Get the following:
<ol>
	<li>
		<p>Bullet 1Bullet 2Bullet 3</p>
	</li>
	<li>&nbsp;</li>
	<li>&nbsp;</li>
</ol>
  1. Would expect to get:
<ol>
	<li><p>Bullet 1</p></li>
	<li><p>Bullet 2</p></li>
	<li><p>Bullet 3</p></li>
</ol>
  1. My expectations are based on the use of tools such as DreamWeaver.

Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1650057&group_id=75348&atid=543653

Change History (15)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Reporter: changed from Frederico Caldeira Knabben to andyrudmik@…

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Milestone: FCKeditor 2.5

Confirmed the described behavior with Firefox only. With IE, nothing is applied instead.

comment:3 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:4 Changed 17 years ago by Martin Kou

This is actually a browser bug. Step 3 in the description is mostly just the following line of code:

FCK.EditorDocument.execCommand( "FormatBlock", false, "<p>" ) ;

This also explains why it behaves differently in different browsers.

I'll see if it's possible to work around this.

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Martin, this issue is probably to be fixed with the new style system to be implemented for the 2.5. So, just leave it for now. Once the style system is ready, we'll be able to work on this one.

comment:6 Changed 17 years ago by Frederico Caldeira Knabben

Component: GeneralCore : Styles

comment:7 Changed 17 years ago by Frederico Caldeira Knabben

Owner: Martin Kou deleted
Status: assignednew

comment:8 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Discussion added

I'm a bit unsure on the way to proceed with this one.

The reporter expects to have the block styles applied inside the <li> elements, which seams a reasonable thing, as <li> can handle block elements. The reporter has also stated that this is the behavior with Dreamweaver.

Doing the same thing in MS Word instead, bring us different results. It transforms each selected <li> in a paragraph, considering a <li> a type of block, not a block container.

Now the question... which strategy should we follow?

I have the impression that developers would prefer the Dreamweaver way, while the poor "normal" end users expect to have a Word like thing.

comment:9 Changed 17 years ago by Andy

I have confirmed my recommendation based on the fact the the following HTML editors support my recommendation:

  1. Google Docs editor
  2. Ephox Editlive Java applet
  3. Dreamweaver
  4. SeaMonkey (former Netscape)

In my opinion, this transformation is natural and expected by the user. For example if I bold the list I would expect <li><b>....</b></li> not <b><li>...</li></b>.

comment:10 in reply to:  9 Changed 17 years ago by Frederico Caldeira Knabben

Replying to arudmik:

I have confirmed my recommendation based on the fact the the following HTML editors support my recommendation:

  1. Google Docs editor
  2. Ephox Editlive Java applet
  3. Dreamweaver
  4. SeaMonkey (former Netscape)
  1. Google Docs editor : this is not something to be compared with, really.
  2. Ephox Editlive Java applet : I think they are not really something to base a standard with.
  3. Dreamweaver : this is an application to create web pages, not to edit text.
  4. SeaMonkey (former Netscape) : this one could be considered.

In other words, we should be focused on software that "end users" are used to use. This is why I prefer to point to MS Word, because it is a de facto standard.

In my opinion, this transformation is natural and expected by the user. For example if I bold the list I would expect <li><b>....</b></li> not <b><li>...</li></b>.

This one is certainly correct... but <b> is an inline element, while <p> is a block element, so we are talking about a completely different thing.

I'm not saying here that your proposal is incorrect. I'm just trying to take the correct argumentations to help us taking decisions. Let's see if others have more thoughts about it.

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

I don't think that generating

<ol>
	<li>
		<p>Bullet 1Bullet 2Bullet 3</p>
	</li>
	<li>&nbsp;</li>
	<li>&nbsp;</li>
</ol>

is what any user would expect.

I could understand removing all the <ol> and converting each <li> to a <p>, or replace the <ol> with <p> and separate the replace the <li> to lines separated by <br>

In firefox, if instead of selecting just the <ol> you have a paragraph after it and then select both (so the format already list "Normal"), then applying the Normal format this time is applied inside the <li>

In my test in MS Word, if I apply "Normal" format to a list of items, each of those items is converted to a paragraph, and the list is removed.

comment:12 Changed 17 years ago by Andy

I checked with FrontPage as well - they are also consistent with HTML editing best practices. Users would expect that any style applied to a structure (table, list, dev, ...) would apply that style to the top level elements of that structure. For example, applying normal to a table does not change the table to a list of paragraphs, but rather, normal is applied to every cell in the table. Similarly, selecting a list and applying a style should apply that style to every element of the list. The same applies for the dev tag. All text editors including word support the creation of list and the conversion of the list back to paragraphs by deselecting the list button.

One of the main reasons for applying the Normal style to a list is to provide the list with paragraph spacing. Otherwise the list items are too close and hard to read.

Should the developers of fckEditor choose to implement the application of styles to structures different from widely used HTML editors at least provide the option to configure this feature. Otherwise we will have to customize the editor before incorporation into our product.

By the way, I do not hold up Word as an example of a good model for text editing and formating. Word in many areas is very difficult to use. Unfortunately, it is ubiquitous but not because its a well designed application from a usability perspective.

comment:13 Changed 17 years ago by Andy

Another thought is our use of the style name Normal. It seems my thought really apply to the style named Paragraph. I need the ability to apply a Paragraph style to a structure in such a way that the style is applied to every element of that structure. I really do not know what Normal is.

comment:14 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Discussion removed

arudmik, I'm not aiming to be rude, really, but you are filling your comments with arguments without any base, just to try to convince. Things like "they [FrontPage] are also consistent with HTML editing best practices" really destroy your credibility, and tend to make your comments ignored. Again... I'm just trying to point you out that we should always be objective and base our conclusions on facts.

One of the main reasons for applying the Normal style to a list is to provide the list with paragraph spacing. Otherwise the list items are too close and hard to read.

This could also be true, but don't say that loudly... you would not being get seriously out there :)

The only thing that can be considered is this affirmation:

"All text editors including word support the creation of list and the conversion of the list back to paragraphs by deselecting the list button."

This statement may be the key to take a final decision.

As we have a way to remove the list, we don't need the style system to do that job. I can do that myself if I want it. Otherwise, I would have no ways to create a list with a block element inside of it.

It remains unclear the enter key behavior inside blocks on lists. It should "always" create new lists items, not create new paragraphs inside the same list. Is that right?

comment:15 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

Fixed with [811].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy