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

Soft return inside inline style is removed after edit

    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.

        Activity

        Show
        Konrad Oboza added a comment - PR: https://github.com/ezsystems/ezplatform-richtext/pull/48
        Hide
        Michał Szołtysek added a comment -

        QA Approved on eZ Platform & eZ Platform EE v2.5.2 with diff.

        Show
        Michał Szołtysek added a comment - QA Approved on eZ Platform & eZ Platform EE v2.5.2 with diff.
        Show
        Konrad Oboza added a comment - PR merged: https://github.com/ezsystems/ezplatform-richtext/commit/c1d27158065cfb99b204b93a4171db548c4045b5

          People

          • Assignee:
            Unassigned
            Reporter:
            Mateusz Bieniek
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: