At Tiny, we are passionate about quality, and sometimes that means having to be strict about the use of standards. That’s why we require TinyMCE to run on browsers running in standards mode.
If your browser is not running in standards mode, the following error will be reported in the browser console:
Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode.
To remove the error, make sure any HTML pages on which you are loading TinyMCE start with the following declaration:
<!DOCTYPE HTML>
What is standards mode?
When web standards were introduced by W3C, browsers needed a way to distinguish between sites that were developed according to the standards and sites that were not; otherwise, older sites would not have worked properly. So, to handle this, browsers operate in different modes depending on the HTML they are serving.
There are now three modes used by the layout engines in web browsers:
- quirks mode - supporting websites that were built before the widespread adoption of web standards
- full standards mode - supporting the behavior described by the HTML and CSS specifications
- almost standards mode - in which only a small number of quirks are implemented
When writing your HTML, ensure that your page uses full standards mode by declaring <!DOCTYPE HTML>
before any other HTML on the page; for example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=UTF-8>
<title>This page is running in standards mode!</title>
</head>
<body>
</body>
</html>
If you don’t declare this, and if it’s not declared before any other HTML on your page, the browser may start running in quirks mode.
For more information about these modes, check out this page on quirks mode and standards mode in the MDN web docs.
Not yet using TinyMCE on the cloud? When you’re on the cloud, you’ll always be up to date with the latest build and newest features. Get started with a free API key - you’ll also get a 14-day trial of our premium plugins!