Closed mikidream closed 10 years ago
Hi,
I'm afraid that I must plead my ignorance here. What is the expected behaviour with an RTL language?
Thanks,
Andrew
@nadavkav, perhaps you can advise here ..?
Sure :smile: I will upload a suggested patch
You'll need to add:
.dir-rtl .CodeMirror-lines {text-align: left;}
to: lib/editor/atto/plugins/htmlplus/yui/src/codemirror/assets/moodle-atto_htmlplus-codemirror-core.css
(And run shifter & Moodle's purge caches for it to work, locally)
BTW, Great plugin :smile:
Thanks @nadavkav,
I've added your commit. I moved it to the plugin styles.css instead of keeping it in Codemirror because codemirror only contains upstream code. I wonder if they need a pull request too actually...
Actually @nadavkav, while the fix looks right, it makes the content unmanageable.
Do I understand correctly that the content should be LTR when in code view?
Indeed, I forgot to test it for usability. me bad.
I have added .dir-rtl .CodeMirror pre {direction:ltr;} Which seems to fix it. Please try it too and verify that it solve this issue
On 30 May 2014 06:18, Andrew Nicols notifications@github.com wrote:
Reopened #1 https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1.
— Reply to this email directly or view it on GitHub https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1#event-126276938 .
That's the kind of solution I went for:
.dir-rtl .CodeMirror {
direction: ltr;
}
Can I ask, why LTR? Just trying to understand the issue. I'll push out another version of the plugin this afternoon.
When a user is viewing Moodle from an RTL perspective, All the UI is right aligned and the directionality too. If you run any LTR CSS code into http://cssjanus.commoner.com/ you will get a converted CSS code that can display (mostly correct) the UI properly for RTL reading people to feel confortable with. Everything is mirrored. :-)
Exception to the above, should be all TEXTAREA and INPUT fields where we are absolutely always need to input English data: HTML, eMail, Date, file system path, URL, ...
On 30 May 2014 10:59, Andrew Nicols notifications@github.com wrote:
That's the kind of solution I went for:
.dir-rtl .CodeMirror { direction: ltr; }
Can I ask, why LTR? Just trying to understand the issue. I'll push out another version of the plugin this afternoon.
— Reply to this email directly or view it on GitHub https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1#issuecomment-44624456 .
Just to check, this is correct?
Yes. Looks great.
BTW, I am also using CodeMirror in a forked version of block/configurable_reports. And I made a similar fix over there too. Where It seems I should have pushed it upstream.
On 30 May 2014 11:28, Andrew Nicols notifications@github.com wrote:
Just to check, this is correct? [image: screen shot 2014-05-30 at 16 28 25] https://cloud.githubusercontent.com/assets/370047/3128479/683b0c04-e7d4-11e3-97f3-b713615a0777.png
— Reply to this email directly or view it on GitHub https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1#issuecomment-44626532 .
The codemirror config suggests that it can support RTL, but that seems generally like the wrong thing: http://codemirror.net/doc/manual.html#option_rtlMoveVisually
http://codemirror.net/doc/manual.html#option_rtlMoveVisually - Is used for managing directionality corsor movements in a mixed RTL & LTR text in paragraphs. Where you wish to edit the text (not the HTML tags) when in HTML mode. It is useful in several cases.
On 30 May 2014 11:59, Andrew Nicols notifications@github.com wrote:
Closed #1 https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1 via ed9165d https://github.com/andrewnicols/moodle-atto_htmlplus/commit/ed9165d4072e8844f85667418ca46c1d59d3eebb .
— Reply to this email directly or view it on GitHub https://github.com/andrewnicols/moodle-atto_htmlplus/issues/1#event-126340762 .
Thank you Guys I just git pull and update the plugin in my moodle test and it looks great see image :-)
When the Moodle website is within RTL language (eg Hebrew in my case) the layout of the htmlpluss is rtl instead of ltr. and I cant move it tl the left even without crtl+shift. in the regular html editor it work well . see images please reply me also to my email miki.alliel@gmail.com Thanks
ks