TinyMCE Rich Text Editor

8.4.0 · active · verified Sun Apr 19

TinyMCE is a powerful, open-source JavaScript HTML WYSIWYG editor control that enables rich text editing capabilities directly within web applications. As of April 2026, the current stable version is 8.4.0, with TinyMCE 8 being the recommended branch for continued security updates and active development. The library maintains a consistent release cadence, frequently pushing updates and patches. TinyMCE differentiates itself as one of the most widely used and customizable editors globally, boasting over 350 million downloads annually and powering millions of products. It offers an extensive API with over 400 options, more than 50 plugins, and support for three distinct editing modes: classic, inline, and distraction-free. Its flexibility allows developers to configure the UI and functionality to match specific application needs, from simple text areas to complex document editors. TinyMCE is known for its scalability and enterprise-grade features, making it a robust choice for projects requiring advanced content creation and management tools. It provides integrations for popular frameworks like React, Vue, and Angular via dedicated wrapper packages.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize TinyMCE in a web application using npm imports for the core, themes, and common plugins, setting up a basic editor on a dynamically created textarea. It includes typical toolbar and menubar configurations.

import tinymce from 'tinymce';
import 'tinymce/themes/silver';
import 'tinymce/icons/default';
import 'tinymce/plugins/advlist';
import 'tinymce/plugins/autolink';
import 'tinymce/plugins/lists';
import 'tinymce/plugins/link';
import 'tinymce/plugins/image';
import 'tinymce/plugins/charmap';
import 'tinymce/plugins/preview';
import 'tinymce/plugins/anchor';
import 'tinymce/plugins/searchreplace';
import 'tinymce/plugins/visualblocks';
import 'tinymce/plugins/code';
import 'tinymce/plugins/fullscreen';
import 'tinymce/plugins/insertdatetime';
import 'tinymce/plugins/media';
import 'tinymce/plugins/table';
import 'tinymce/plugins/help';
import 'tinymce/plugins/wordcount';

// Ensure the DOM is fully loaded before initializing TinyMCE
document.addEventListener('DOMContentLoaded', () => {
  const textarea = document.createElement('textarea');
  textarea.id = 'mytextarea';
  textarea.value = '<p>Hello, <strong>TinyMCE</strong>!</p>';
  document.body.appendChild(textarea);

  tinymce.init({
    selector: '#mytextarea',
    plugins: 'advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table help wordcount',
    toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help',
    menubar: 'file edit view insert format tools table help',
    height: 500,
    // Replace process.env.TINYMCE_API_KEY with your actual TinyMCE cloud API key for cloud deployments
    // For self-hosted, this setting is not required unless using specific cloud services.
    // If using the cloud CDN, ensure to load the script <script src="https://cdn.tiny.cloud/1/{YOUR_API_KEY}/tinymce/8/tinymce.min.js"></script>
    // and provide the key here: api_key: process.env.TINYMCE_API_KEY ?? ''
  });
});

view raw JSON →