Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29196

richtext editor not handling list items which contains line breaks

    Details

      Description

      If you in the backend editor ( in a richtext field) creates a list ( ordered or unordered) and then hit [shift]+[enter], you may split the item ( which is a paragraph ) into multiple lines.

      This will look just fine in the editor (image1), but it will be not be saved correctly.

      The saved xml will look like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <section
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
          xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
          <itemizedlist>
              <listitem>
                  <para>item1 line1item1 line2</para>
              </listitem>
              <listitem>
                  <para>item2</para>
              </listitem>
          </itemizedlist>
      </section>
      

      But I think it should be saved like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <section
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
          xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
          <itemizedlist>
              <listitem>
                  <para><literallayout class="normal">item1 line1
      item1 line2</literallayout></para>
              </listitem>
              <listitem>
                  <para>item2</para>
              </listitem>
          </itemizedlist>
      </section>
      

      In short, the '<literallayout class="normal">' tag is missing

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment - - edited

          Also, if you put my proposed xml into the database manually, it will be rendered correctly
          Editor will also load the content and view it correctly, but will again save it incorrectly

          Show
          Vidar Langseid added a comment - - edited Also, if you put my proposed xml into the database manually, it will be rendered correctly Editor will also load the content and view it correctly, but will again save it incorrectly

            People

            • Assignee:
              Unassigned
              Reporter:
              Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: