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

Soft return inside inline style is removed after edit

    XMLWordPrintable

Details

    Description

      Applying an inline style to the paragraph with the soft return will be properly saved and displayed at the first time, but editing the same content will remove soft return from RichText editor and in result will be removed on save.

      Steps to reproduce
      1. Clean installation of eZ Platform 2.5
      2. Create a new Test Content Type with only RichText field.
      3. Create a new Custom Style:

      ezplatform.yml
      ezrichtext:
          custom_styles:
              highlighted_word:
                  template: 'styles/highlighted_word.html.twig'
                  inline: true
      ezpublish:
          system:
              admin_group:
                  fieldtypes:
                      ezrichtext:
                          custom_styles: [highlighted_word]
      
      styles/highlighted_word.html.twig
      <span style="color: red">{% spaceless %}{{ content|raw }}{% endspaceless %}</span>
      

      4. Create a new Content of Content Type Test with some text and soft return in the middle (shift+enter). Apply highlighted_word style to whole paragraph. Publish content.
      5. You will see in Preview that style is applied correctly with soft return.
      6. Edit content.

      Result
      Soft return in the custom style is removed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: