Search code examples
tinymce

TinyMCE editor is not loading because document is not in standards mode - how can I get my document in standards mode?


I am so close to getting the TinyMCE editor to work at our site. The necessary scripts when adding a discussion are loading.I can see them in the HTML source. And my domain is properly registered for the API key I'm using. And the id/name of the textarea is correct. But the editor itself doesn't load for the textarea.

There is just one JavaScript console error:

Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode.

Does anybody know what "standards mode" is and how I can make sure the page served is in standards mode?


Solution

  • A big never mind. I found the solution. The document was in so-called "quirks" mode because there was no DOCTYPE. I added this on top and the editor worked just fine!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">