I'm using the the following code to generate TinyMCE:
(Removed the options in
plugins for clarity)
My page is generated dynamically via PHP, and the script shown above is included in that. The resulting output is tidied with PHP's
htmltidy lib, generating a valid XHTML page.
However, the page occasionally gets incorrectly rendered, this seems to be at random. One example is the following code (shown when I view source in Safari):
<li class="navLink"> <a href="http://myaddress/index.php?action=sites">Site Management</a> </li>
But when I inspect this link in Safari, I see that the language include for TinyMCE is being included half way in the
href attribute of the link. The HTML being included inside the
href is as follows:
This happens randomly, with no pattern that I can discern. Refreshing usually clears the problem up. I have verified this problem happens in other browsers (FF, IE, Chrome).
Unfortunately, the website this is occuring on in is currently in development, and cannot be shown to the general public (Sorry about that).
I've tried manually including the language file, in case TinyMCE doesn't load it if it's already declared. No dice.
So, in short: It seems that TinyMCE is including it's language file dynamically, which is occasionally throwing my page out of whack. How can I fix this?
I believe I have fixed this issue by using the jQuery version of TinyMCE instead of the normal JS one.