Ticket #2240 (closed Bug: wontfix)

Opened 6 years ago

Last modified 6 years ago

Editor doesn't support XHTML spec for inclusion of <div> <p> etc within a <li> list item

Reported by: mike.ewins Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: FCKeditor 2.6
Keywords: Confirmed Cc:

Description

See Word example for the kind of formatting Travelers (our customer and a customer of your with current Support) are attempting to create. Ignore the blank paras between list items - clearly these should be removed and included as margin between the list items. It is the para following number 1. that is the particular problem.

HTML examples as follows:

Nested list without unnumbered para (from Word):

<ol type="1"> <li style="margin: 0pt; color: black"><span style="font-size: 10pt">The following Exclusions are added to this Network Security Section </span> <ol style="margin-top: 0pt" type="a"> <li style="margin: 10pt 0pt 0pt; color: black"><span style="font-size: 10pt">Damage directly or indirectly caused by or resulting from any Computer or Telecommunication System used for the purpose of operating or controlling machinery or equipment and inter alia this exclusion shall exclude Damage directly or indirectly resulting from computer controlled building management systems security lighting security cameras and other security devices and fire protection devices </span></li> </ol> </li> </ol>

Nested list with unumbered para inbetween (from Word):

<ol type="1"> <li style="margin: 0pt; color: black"><span style="font-size: 10pt">The following Exclusions are added to this Network Security Section </span></li> </ol> <div style="margin: 0pt 0pt 0pt 36pt"><span style="font-size: 10pt; color: black">The insurance provided under this Network Security Section does not cover</span></div> <ol type="1"> <ol type="a"> <li style="margin: 0pt; color: black"><span style="font-size: 10pt">Damage directly or indirectly caused by or resulting from any Computer or Telecommunication System used for the purpose of operating or controlling machinery or equipment and inter alia this exclusion shall exclude Damage directly or indirectly resulting from computer controlled building management systems security lighting security cameras and other security devices and fire protection devices </span></li> </ol> </ol>

Nested list with unumbered para inbetween (manually edited to achieve valid XHTML):

<ol type="1"> <li style="margin: 0pt; color: black"><span style="font-size: 10pt">The following Exclusions are added to this Network Security Section </span><div style="margin: 0pt 0pt 0pt 36pt"><span style="font-size: 10pt; color: black">The insurance provided under this Network Security Section does not cover</span></div> <ol type="a"> <li style="margin: 0pt; color: black"><span style="font-size: 10pt">Damage directly or indirectly caused by or resulting from any Computer or Telecommunication System used for the purpose of operating or controlling machinery or equipment and inter alia this exclusion shall exclude Damage directly or indirectly resulting from computer controlled building management systems security lighting security cameras and other security devices and fire protection devices </span></li> </ol></li> </ol>

Example created in the Editor: nested list:

<ol type="1"> <li><span>The following Exclusions are added to this Network Security Section</span> <ol type="a"> <li><span><span style="font-size: 10pt; color: black; font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA">Damage directly or indirectly caused by or resulting from any Computer or Telecommunication System used for the purpose of operating or controlling machinery or equipment and inter alia this exclusion shall exclude Damage directly or indirectly resulting from computer controlled building management systems security lighting security cameras and other security devices and fire protection devices </span></span></li> </ol> </li> </ol>

Example created in the Editor: nested list with unnumbered para inbetween:

<ol type="1"> <li><span>The following Exclusions are added to this Network Security Section</span></li> </ol> <p style="margin-left: 40px">Unnumbered para inbetween.&nbsp;</p> <ol type="a"> <li><span><span style="font-size: 10pt; color: black; font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA">Damage directly or indirectly caused by or resulting from any Computer or Telecommunication System used for the purpose of operating or controlling machinery or equipment and inter alia this exclusion shall exclude Damage directly or indirectly resulting from computer controlled building management systems security lighting security cameras and other security devices and fire protection devices </span></span></li> </ol>

It generally seems to be very hard to workaround this problem, even in the Editor. Travelers are wanting a solution that allows users to create freetext clauses in XHTML without needing to understand and code in XHTML. However, their developers can't workaround this issue, hence the ticket.

Attachments

Mekon.doc (44.0 KB) - added by mike.ewins 6 years ago.

Change History

Changed 6 years ago by mike.ewins

comment:1 Changed 6 years ago by w.olchawa

  • Keywords Confirmed added
  • Priority changed from High to Normal
  • Milestone FCKeditor 2.6.1 deleted

comment:2 Changed 6 years ago by fredck

  • Status changed from new to closed
  • Resolution set to wontfix

There is no way for us to support all those combinations. Let's analyze each one, getting the reported samples:

Nested list without unnumbered para (from Word)

This situation looks good. Word sent a properly nested list.

Nested list with unumbered para inbetween (from Word)

The input HTML from word is clearly invalid. Also, there is no relation between the files <ol>, the <div> the and <ol> after it. Word does it hacks to visually combine them, but there is no way for us to understand that relation.

Nested list with unumbered para inbetween (manually edited to achieve valid XHTML)

This example is valid, but I don't see any unumbered para inbetween. It looks like the first example.


Currently, it is not possible to create new paragraphs when editing inside a list item. We have to give a standard behavior for the enter key, and we understood that usually people want new items when hitting enter, instead of new paragraphs. Actually, creating several paragraphs in a single list item is quite rare.

In any case, it is possible to achieve the desired results with FCKeditor. It is not an obvious procedure, but can be anyway helpful in such cases. I've created the following HTML with the editor:

<ol>
    <li>
    <p>Item 1 - Para 1</p>
    <p>Item 1 - Para 2</p>
    <ol type="a">
        <li>
        <p>Sub Item 1.a</p>
        </li>
    </ol>
    </li>
    <li>
    <p>Item 2</p>
    </li>
</ol>

The following were the steps to achieve this:

  1. In a blank paragraph, type "Item 1 - Para 1"
  2. Transformed it in a list with the Numbered List button.
  3. In the Format combo, select "Normal" to transform the list contents in a paragraph.
  4. Hit ENTER. It creates new item.
  5. Typed "Item 1 - Para 2".
  6. Placed the caret at the start of the newly created item and hit BACKSPACE. It will join this item with the previous one.
  7. In the Format combo, select "Normal" to transform the joined text in a paragraph.
  8. At the end of "Item 1 - Para 2" hit ENTER. A new item is created.
  9. Type "Sub Item 1.a".
  10. Indent the list item.
  11. For the sake of correctness, right click on this item and select the "Numbered List Properties". For "Type" select "Lowercase Letters".
  12. In the Format combo, select "Normal" to move the 1.a contents into a paragraph.
  13. Hit ENTER at the end of "Sub Item 1.a". Sub item "b" is created.
  14. Outdent the sub item "b". It get transformed on item "2".
  15. Type "Item 2".
  16. In the Format combo, select "Normal" to move the item 2 contents into a paragraph.

While the above description seems long, it is just the normal procedure to create such list. The only tricky thing here is point 6, which is definitely acceptable and easy to achieve.

comment:3 Changed 6 years ago by mike.ewins

  • Status changed from closed to reopened
  • Resolution wontfix deleted

Thanks for this. However, the problem I'm having is mixing list items and unnumbered paragraphs in the same list. I tried to use your techniques to create what I require but it isn't helping.

Please could you suggest a procedure that will enable me to create the following:

<ol>

<li>List 1 - Item 1 <p>Item 1 - Para 1</p> <ol type="a">

<li>Sub Item 1.a</li>

</ol> </li> <li>List 1 - Item 2</li>

</ol>

Thanks for your help.

comment:4 Changed 6 years ago by fredck

  • Status changed from reopened to closed
  • Resolution set to wontfix

@mike.ewins,

You will not be able to do that. You need to transform "List 1 - Item 1" in a paragraph (point 3 in my previous comment). In this way you will have an output much similar to your expectations:

<ol>
    <li>
    <p>List 1 - Item 1</p>
    <p>Item 1 - Para 1</p>
    <ol type="a">
        <li>Sub Item 1.a</li>
    </ol>
    </li>
    <li>List 1 - Item 2</li>
</ol>

PS.: Please do not reopen the ticket for support discussions. It is enough to add further comments to it.

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