Just what it says in the title. See this discussion on the French forum where a hack is provided.
Please make the browser spell checker available in TinyMCE by default (or as a Site Admin option) in Moodle!
Just what it says in the title. See this discussion on the French forum where a hack is provided.
Please make the browser spell checker available in TinyMCE by default (or as a Site Admin option) in Moodle!
Par défaut dans tinyMCE il n'y a pas de correcteur orthographique Voir https://www.tiny.cloud/blog/tinymce-spellchecker/
If you don’t want the additional functionality provided by Spell Checker Pro, but you need to provide basic spell checking for your users, you can enable browser-based spell checking. To enable browser-based spell checking in TinyMCE, set the browser_spellcheck
option to true in your TinyMCE initialization script.
Il faudrait que cette option soit disponible dans le paramétrage de l'éditeur tinyMCE dans l'administration du site ! Bizarrement je n'ai trouvé aucune remarque au sujet de ce manque de correcteur orthographique dans tinyMCE sur le forum anglophone...
@Christian,
Oui, je sais tout ça... Et ça ne répond pas à mon problème... que j'ai finalement résolu par un petit bidouillage.
Yes, this script should work as intended.
The script first checks if the dateString
starts with a -
character to determine if it represents a negative year. If it does, it creates a new string by adding '1 1 ' to the beginning of the dateString
, which will create a valid date string that can be parsed by the Date.parse()
method.
If dateString
does not start with a -
character, the script simply passes it to the Date.parse()
method.
The Date.parse()
method returns the number of milliseconds since January 1, 1970, 00:00:00 UTC for the given date string. The script stores this value in the dateMillis
variable.
One thing to note is that the var
keyword is used to declare the negDateString
, dateMillis
, and isNegativeYear
variables. In modern JavaScript, it's recommended to use let
or const
instead of var
to declare variables. Additionally, it's worth noting that the Date.parse()
method may not be the best choice for parsing date strings in all cases, as it has some quirks and limitations.
Merci Christian,
Curieusement en effet, ça marche si on donne une date complète, avec mois et jour an plus de l'année négative ! Mais pour des dates aussi éloignées dans le temps (et approximatives) que la grotte de Lascaux (environ 13 000 avant J.-C.), voir s'afficher
January 1, 13000 BCE au lieu de 13000 BCE c'est plutôt ridicule.
Il va falloir que je creuse encore la question, mais merci de m'avoir donné une piste (tu es meilleur que ChatGPT 😎).