'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 1:[1]
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">
Solution 2:[2]
Even later I discovered something that might help.
Check if the first tag is of the <!doctype html>. In my case a tag was taking the first place.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Doug Lerner |
Solution 2 | Henrique Ribeiro |