SPIP's text syntax

Hi all,

A colleague just asked me something that has puzzled me in the past, so I thought I'd ask the list. Is it possible to add block-level elements (e.g. paragraphs) within a list item using SPIP's text syntax?

In Markdown, for example, I'd write this:

==== markdown ====
1. A list item

2. A list item

     With paragraphs in it.

3. Another
==== /markdown ====

And get:

==== html ====
<ol>
<li><p>An item in a numbered list</p></li>
<li><p>Another item in a numbered list.</p>

<p>This time, with multiple paragraphs.</p></li>
<li><p>Another thing</p></li>
</ol>
==== /html ====

But I can't figure out if and how this can be done in SPIP and have had to resort to using line breaks, a clearly inferior "solution".

If it is not possible, I think the lack is a bug. This is something that is reasonably widely used (legal documents like terms and conditions and disclaimers often have multiple paragraphs in list items) and it ought to be possible using SPIP's typographical shortcuts.

Thanks,

Thomas Sutton

Web Developer
bouncingorange
graphic + web design

On Mon, Feb 23, 2009 at 7:22 AM, Thomas Sutton <thomas@bouncingorange.com> wrote:

Hi all,

A colleague just asked me something that has puzzled me in the past, so I thought I’d ask the list. Is it possible to add block-level elements (e.g. paragraphs) within a list item using SPIP’s text syntax?

In Markdown, for example, I’d write this:

==== markdown ====

  1. A list item

  2. A list item

With paragraphs in it.

  1. Another
    ==== /markdown ====

And get:

==== html ====

  1. An item in a numbered list

  2. Another item in a numbered list.

    This time, with multiple paragraphs.

  3. Another thing

==== /html ====

But I can’t figure out if and how this can be done in SPIP and have had to resort to using line breaks, a clearly inferior « solution ».

If it is not possible, I think the lack is a bug. This is something that is reasonably widely used (legal documents like terms and conditions and disclaimers often have multiple paragraphs in list items) and it ought to be possible using SPIP’s typographical shortcuts.

Thanks,

To my knowledge, this is indeed not possible using Spip’s shortcut.

By the way, this would have to be confirmed but that sounds not really « standard » to me. Is it ???


Etienne B.
http://www.loiseau2nuit.net
P. J. O’Rourke - « Everybody knows how to raise children, except the people who have them. »

On 23/02/2009, at 7:32 PM, L'oiseau2nuit wrote:

On Mon, Feb 23, 2009 at 7:22 AM, Thomas Sutton <thomas@bouncingorange.com> wrote:
Hi all,

A colleague just asked me something that has puzzled me in the past, so I thought I'd ask the list. Is it possible to add block-level elements (e.g. paragraphs) within a list item using SPIP's text syntax?

In Markdown, for example, I'd write this:

==== markdown ====
1. A list item

2. A list item

   With paragraphs in it.

3. Another
==== /markdown ====

And get:

==== html ====
<ol>
<li><p>An item in a numbered list</p></li>
<li><p>Another item in a numbered list.</p>

<p>This time, with multiple paragraphs.</p></li>
<li><p>Another thing</p></li>
</ol>
==== /html ====

But I can't figure out if and how this can be done in SPIP and have had to resort to using line breaks, a clearly inferior "solution".

If it is not possible, I think the lack is a bug. This is something that is reasonably widely used (legal documents like terms and conditions and disclaimers often have multiple paragraphs in list items) and it ought to be possible using SPIP's typographical shortcuts.

Thanks,

To my knowledge, this is indeed not possible using Spip's shortcut.

By the way, this would have to be confirmed but that sounds not really "standard" to me. Is it ???

Section 10.2 of the HTML 4.01 specification (Lists in HTML documents) defines <LI> elements as containing zero or more block or inline elements.

Similarly, the XHTML 1.0 definition just XML-izes this description. The Strict, Transitional, and Frameset DTDs allow <li> elements to contain zero or more PCDATA and block, <form>, inline, and misc elements (script, noscript, etc.).

That's one of the reasons I find the lack frustrating :wink:

Regards,

Thomas Sutton

Web Developer
bouncingorange
graphic + web design

On Tue, Feb 24, 2009 at 12:18 AM, Thomas Sutton <thomas@bouncingorange.com> wrote:

Section 10.2 of the HTML 4.01 specification (http://www.w3.org/TR/html4/struct/lists.html#h-10.2) defines

  • elements as containing zero or more block or inline elements.

    Similarly, the XHTML 1.0 definition just XML-izes this description. The Strict, Transitional, and Frameset DTDs allow

  • elements to contain zero or more PCDATA and block, , inline, and misc elements (script, noscript, etc.).

    That’s one of the reasons I find the lack frustrating :wink:

    Regards,

    Thomas Sutton

    Web Developer
    bouncingorange
    graphic + web design

  • Thanks for the information.
    I was so sure i did not even verify my supposition… probably abused by some unrelevant blog …

    Well, I’ll have to read those specifs once again I think :smiley:

    Good luck in your research


    Etienne B.
    http://www.loiseau2nuit.net
    Vince Lombardi - « Winning is habit. Unfortunately, so is losing. »

    Thomas Sutton a écrit :

    A colleague just asked me something that has puzzled me in the past, so I thought I'd ask the list. Is it possible to add block-level elements (e.g. paragraphs) within a list item using SPIP's text syntax?

    maybe using html syntax like <ul><li>... in textes
    is possible for your authors ?

    it is possible with spip.

    JL

    In Markdown, for example, I'd write this:

    ==== markdown ====
    1. A list item

    2. A list item

        With paragraphs in it.

    3. Another
    ==== /markdown ====

    And get:

    ==== html ====
    <ol>
    <li><p>An item in a numbered list</p></li>
    <li><p>Another item in a numbered list.</p>

    <p>This time, with multiple paragraphs.</p></li>
    <li><p>Another thing</p></li>
    </ol>
    ==== /html ====

    But I can't figure out if and how this can be done in SPIP and have had to resort to using line breaks, a clearly inferior "solution".

    If it is not possible, I think the lack is a bug. This is something that is reasonably widely used (legal documents like terms and conditions and disclaimers often have multiple paragraphs in list items) and it ought to be possible using SPIP's typographical shortcuts.

    Thanks,

    Thomas Sutton

    Web Developer
    bouncingorange
    graphic + web design

    On 25/02/2009, at 3:53 AM, JLuc wrote:

    Thomas Sutton a écrit :

    A colleague just asked me something that has puzzled me in the past, so I thought I'd ask the list. Is it possible to add block-level elements (e.g. paragraphs) within a list item using SPIP's text syntax?

    maybe using html syntax like <ul><li>... in textes
    is possible for your authors ?

    Not really. Most of the authors on the sites we build are marketing managers and communications directors and their personal assistants and the like. They aren't interested in having to learn even more complicated syntax to do something so simple.

    it is possible with spip.

    Yeah, I quite frequently need to use it for exactly these sorts of situations, but I'd prefer not to. If I have to write HTML, then I'd rather get rid of the shortcuts altogether than mix HTML with other markup conventions.

    For paragraphs in lists I usually just insert line-breaks with "/^_ /" and try to ignore the fact that it's breaking usability.

    Thanks,

    Thomas Sutton

    Web Developer
    bouncingorange
    graphic + web design