How did you get that screenshot? and what's the point of a Skip choice? That would be the equivalent of a Don't know label, wouldn't it?
Joseph Rézeau
Posts made by Joseph Rézeau
Hi Marcus,
Yes I know, that's what I mentioned in my first post. It works fine for detecting ATTO, but the problem is there does not seem to be a working way to detect the TinyMCE editor!
Yes I know, that's what I mentioned in my first post. It works fine for detecting ATTO, but the problem is there does not seem to be a working way to detect the TinyMCE editor!
What I mean is that I cannot use the const
tinymceIsLive in my script, it's always false.Hi Bret and thanks for trying to help.
I had already tried this solution (prompted by Chat GPT) but ... it does not work. Whether tinyMCE is enabled or not, it returns false.
For a new question type I am developing I need to manipulate the question text. Because that text is displayed differently in the ATTO and TinyMCE editors, I need to find out in my JS script which editor is in use. This works:
const attoIsLive = $('.editor_atto').length;
const tinymceIsLive = !attoIsLive;
Well, it works until Moodle makes another editor available in the near future. What would be a more robust way to find out if TinyMCE is being used?