You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I'm seeing the error ReferenceError Can't find variable: tinyMCE. I'm sure there's a problem with my setup that I can figure out independently, but I thought I'd point out that based on the code, I should instead be seeing tinyMCE is not loaded. If you customized TINYMCE_JS_URL, double-check its content. as my error message. The reason this is not happening is because when we reference the global variable tinyMCE, we don't prefix it with the scope that we want javascript to search for the global variable, so the error message assumes that we're missing a variable in the local scope. I think if we change the check to
if(!globalThis.tinyMCE){throw'tinyMCE is not loaded. If you customized TINYMCE_JS_URL, double-check its content.';}
it should throw the expected error instead. See, for example, this quick test from my browser console:
Currently, I'm seeing the error
ReferenceError Can't find variable: tinyMCE
. I'm sure there's a problem with my setup that I can figure out independently, but I thought I'd point out that based on the code, I should instead be seeingtinyMCE is not loaded. If you customized TINYMCE_JS_URL, double-check its content.
as my error message. The reason this is not happening is because when we reference the global variabletinyMCE
, we don't prefix it with the scope that we want javascript to search for the global variable, so the error message assumes that we're missing a variable in the local scope. I think if we change the check toit should throw the expected error instead. See, for example, this quick test from my browser console:
Here's the MDN docs for globalThis for reference, in case that helps clarify anything.
The text was updated successfully, but these errors were encountered: