1. Login to Moodle as a teacher.
2. Install a Right-to-left language pack (Hebrew, for example).
3. Create a new post in the "News Announcements" forum.
4. Change your keyboard language to Hebrew.
5. Write a couple of paragraphs.
6. Select all the text in the editor.
7. Click on the "Right to left" button.
8. Click on the "Right align" button.
9. Notice that for now the directionality of the text is correct - The period is presented at the end of the Hebrew sentence, on the left side of it.
9. Switch to HTML view
Each one of the paragraphs elements (<p>) should have a "dir=rtl" attribute.
The separate paragraphs elements don't have a "dir=rtl" attribute, and the only element that have a "dir=rtl" attribute is the encompassing <p> element that include all the separate paragraphs (<p> elements).
In HTML, a <p> element doesn't suppose to handle nested <p> elements in it, and because of that there is no inheritance of attributes. Therefore the directionality attribute of the encompassing <p> element does not follow to the child <p> elements in it, and the paragraphs in the text don't get the expected directionality - right to left.
BTW, If you'll switch back (from HTML view) to text view, you'll notice that the directionality is now incorrect. Anyway, the real issue here is that when the post is sent to the students via e-mail, the e-mail client (Gmail, most of the time) presents the text with an incorrect directionality. While at least sometimes the text would be displayed "RTL correctly" in Moodle, outside of it (in an e-mail client or any other external program that renders text in a different way than Moodle in an RTL UI mode) it would display incorrectly.
Also, this is not the only issue with Right-to-left editing in Atto, but maybe investigating and fixing this issue would fix some of the other issues.
- will be (partly) resolved by
MDL-45227 Add text direction to default ATTO generated markup