Rich Text Editor, bug and desire.

Rich Text Editor, bug and desire.

Emmanuelle Gutiérrez y Restrepo發表於
Number of replies: 5

Hi all,

There is an error in the Richtext Editor, theoretically it should change the language of their interface of according to the language that the user has elect as preferable in his navigator, but this doesn't happen. 
 
On the other hand, personally I would like it that the options of style: "Heading 1", Heading 2", etc. was enabled. Can somebody tell me how I can get this?

Thanks in advance smiley.gif

評比平均分數: -
In reply to Emmanuelle Gutiérrez y Restrepo

Re: Rich Text Editor, bug and desire.

Martin Dougiamas發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片
Yes, the Richtext editor translations are separate to the rest of Moodle (it's not possible to integrate them because the Richtext editor is Javascript not PHP).

But it should be selecting the translations OK based on the browser setting, like you say. If not, can someone perhaps work out why?

As for Heading 1, Heading 2 - they are there already! In the Style menu. 微笑

In reply to Martin Dougiamas

Re: Rich Text Editor, bug and desire.

Emmanuelle Gutiérrez y Restrepo發表於

Yes, the problem is that it doesn't work like it, you can make the test changing the language preferred in your navigator (remember only IExplorerangry.gif): 
(Tools >> Internet options... >> General, Languages) 
The editor contains a page with the translation to the following languages: 
Norwegian, German, French, Spanish (es-mx) and finally my translation to Spanish (es-es). (I attached this file). 
Naturally if you use Moodle in a site in which will only use a language, it is easy to make that the RichTextEditor offers its interface in that language, it is only necessary to change the line number 100 in rte_lang.js: 
  lang = locale["en-us"]; 
 
But to me, it interests me that it works in 3 languages 傷心 
 
Regarding the " Styles ", yes, indeed, those headed are there, but they don't work. In the file rte_interface.js are disabled: 
// Define the default style list 
 this.styleList = [ 
  // element  description   Active 
  [null,   "Normal",   0], 
  [null,   "Heading 1",  0], 
  [null,   "Heading 2",  0], 
  [null,   "Heading 3",  0], 
  [null,   "Heading 4",  0], 
  [null,   "Heading 5",  0], 
  [null,   "Heading 6",  0], 
  [null,   "Address",   0], 
  [null,   "Formatted",  0], 
  ["BLOCKQUOTE", "Blockquote",  0], 
  ["CITE",  "Citation",   0], 
  ["BDO",   "Reversed",   0], 
  ["BIG",   "Big",    0], 
  ["SMALL",  "Small",   0], 
  ["DIV",   "Div",    0], 
  ["SUP",   "Superscript",  0], 
  ["SUB",   "Subscript",  0] 
 ]; 
 
Try to introduce an H2 in your answer message in this forum and you will see that it is impossible. Would somebody know how to fix this?

thanks in advance smiley.gif

In reply to Emmanuelle Gutiérrez y Restrepo

Re: Rich Text Editor, bug and desire.

Martin Dougiamas發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片

Heading 1

Heading 2

Hmm .. headings work OK for me in English!

Thanks for the Spanish translation - I'll add that to the Moodle source.

I understand your frustration with it being IE only, but at the time it was a case of "something is better than nothing".  Personally I rarely use IE, and so I rarely use Richtext anyway.  There are some plans for a Mozilla equivalent: http://moodle.org/bugs/bug.php?op=show&bugid=309 

HTMLArea 3.0 is looking very promising: http://www.interactivetools.com/staff/ben/htmlarea3_demo/example.html

In reply to Emmanuelle Gutiérrez y Restrepo

Re: Rich Text Editor, bug and desire.

Martin Dougiamas發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片
OK, I looked into this a bit more. Changing the languages in IE is not enough. You need to change the language in the Control Panel and reboot - that's the language that IE returns when asked for the locale. I just tried it with German and the Richtext editor came up in Herman without the hardcoding hack on line 100.

Secondly, I think we need to use a locale in rte_lang.js of "es" for Spanish (same as Windows) instead of "es-es".

Thirdly, I just upgraded rte_lang.js with the latest file from the Richtext project. It contains more languages (so we have a total of 12 languages in there now, including es and es-mx)