Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-4911

Editor breaks up custom style tags when formatting text inside it

    XMLWordPrintable

Details

    • Yes

    Description

      Steps to reproduce

      1. First format some text using inline custom style
      2. Then mark some of that text inside the custom style as "italic"

       

      Expected behavior : Only one custom style element should be created in xhtml-edit and docbook. Inside that element, the emphasis element should be created. This is what happens on 3.3:

      docbook:

      <section xmlns="http://docbook.org/ns/docbook" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0">
         <para>
            This is
            <eztemplateinline name="highlighted_word" type="style">
               <ezcontent>
                  inline custom tag with
                  <emphasis>partly italic</emphasis>
                  text
               </ezcontent>
            </eztemplateinline>
            - and some stuff afterwards
         </para>
      </section>
       

      html-output

      This is <span class="ezstyle-highlighted_word"><b>inline custom tag with <em>partly italic</em> text</b></span>
       - and some stuff afterwards

      So here, the custom style remains in one single <span>

      Actuall behaviour in 4.3:

      docbook

      <?xml version="1.0" encoding="UTF-8"?>
      <section xmlns="http://docbook.org/ns/docbook" xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom" xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0">
         <para>
            This is
            <eztemplateinline name="highlighted_word" type="style">
               <ezcontent>inline custom tag with</ezcontent>
            </eztemplateinline>
            <emphasis>
               <eztemplateinline name="highlighted_word" type="style">
                  <ezcontent>partly italic</ezcontent>
               </eztemplateinline>
            </emphasis>
            <eztemplateinline name="highlighted_word" type="style">
               <ezcontent>text</ezcontent>
            </eztemplateinline>
            - and some stuff afterwards
         </para>
      </section> 

      The resulting html-output is then split into multiple span which is not
      desirable. Also the emphasized text is not inside the custom style, but vice-versa. All this affects how to style the html output on the front-end

      html-output:

       This is <span class="ezstyle-highlighted_word"><b>inline custom tag with</b></span>
      <em><span class="ezstyle-highlighted_word"><b>partly italic</b></span>
      </em><span class="ezstyle-highlighted_word"><b>text</b></span>
       - and some stuff afterwards

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              vidar.langseid@ibexa.co Vidar Langseid
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: