On node edit, the RTL gets unset only for the first paragraph.

Created on 8 March 2023, over 1 year ago
Updated 15 September 2023, 9 months ago

Problem/Motivation

When editing a node with ckeditor bidi button set to RTL, the RTL gets unset only for the first paragraph.

Steps to reproduce

  1. On a fresh D10 site, install and enable the latest ckeditor_bidi module (as of now that would be 4.x)
  2. Go to edit the text formats / editors at [site.domain]/admin/config/content/formats
  3. Add the "BiDi" button to the editor toolbar
  4. On the plugin configuration, set the "RTL" option to be the Default
  5. Go create a new node
  6. Add more than one paragraph
  7. Make sure all paragraphs have their "dir" set to RTL
  8. Save changes
  9. Viewing the node, see how all the paragraphs have the correct "dir"
  10. Go edit that same node
  11. Note how the first paragraph has lost the RTL dir, while the others still have it

If you make any change to the node, and save it, the first paragraph (that previously had <p dir="rtl">) will lose the direction

Remaining tasks

Add tests?

Attaching here a screencast showing the bug.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina anairamzap Buenos Aires

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024