Blueprint by Tiny
Return to Tiny.cloud
Return to Tiny.cloudTry TinyMCE for Free
Search by
Text that reads "<!DOCTYPE HTML>".

TinyMCE requires standards mode

Ben Long

September 14th, 2020

Written by

Ben Long
Ben Long

Category

How-tos & Tutorials

Tagged

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 30-day trial of our premium plugins!

Support
Ben Long
byBen Long

Developer Advocate at Tiny. Computer scientist turned storyteller. Reminisces about programming on the MicroBee. Writes picture books for kids. Also the wearer of rad shoes. “Science isn’t finished until you share the story.”

Related Articles

  • Abstract illustration of physical servers depicting self-hosting concept.
    How-tos & Tutorials

    How to self-host TinyMCE for your website or application

    by Ben Long in How-tos & Tutorials
  • Text that reads "<!DOCTYPE HTML>".
    How-tos & Tutorials

    TinyMCE requires standards mode

    by Ben Long in How-tos & Tutorials
Subscribe for the latest insights served straight to your inbox. Delivered weekly.

Deploy TinyMCE in just 6 lines of code

Built to scale. Developed in open source. Designed to innovate.

Begin with your FREE API Key
Tiny Editor