wiris / moodle-tiny_wiris

4 stars 3 forks source link

fix: MathType loading faster than TinyMCE #11

Closed carla-at-wiris closed 10 months ago

carla-at-wiris commented 11 months ago

Description

With the new TinyMCE 6 integration, we missed a step, and it seems that, sometimes, the MathType is loading faster than the TinyMCE editor, which makes our plugin to fail and becomes inaccessible.

Steps to reproduce

  1. Open a Moodle 4.2 with PHP 8.1.
  2. Go to settings and select TinyMCE as preferred editor.
  3. Create a course.
  4. Insert content into the course (ex: create a page).
  5. Keep reloading the page until you see the console error and the MathType buttons not appearing.

taskid 38924

xripoll-at-wiris commented 11 months ago

The fix solves an error and MathType works, but there's still an error in the console:

Uncaught (in promise) Error: closure invoked recursively or after being dropped
    __wbindgen_throw http://localhost:8000/lib/editor/tiny/plugins/wiris/js/plugin.min.js:1