The window.tinyMCE.editors API was present in version 3 of TinyMCE, but
is not present in later versions. As a result, this check tries to loop
over a variable which does not exist and throws an error in the process.
We should check that window.tinyMCE *and* window.tinyMCE.editors both
exist before attempting to loop over them.