Details
-
Bug
-
Resolution: Fixed
-
High
-
2.5.1
-
None
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.