I am dynamically creating multiple instances of CodeMirror through PHP however, since the instances are created for a configuration file in Joomla!, some are hidden in tabs so only the CodeMirror instances created in the first tab show up properly, for the rest I have to focus on them and type something for the editor to show properly, I read this is normal when the editors are hidden in tabs and should be using the refresh function to get them to appear as expected but I have not been able to figure out how to do it, this is the PHP code which creates a JavaScript function which then is appended to the document head.