Using the TinyMCE .zip package with the Bootstrap framework

Using TinyMCE with bootstrap does not require any special configuration.

The TinyMCE jQuery integration can be used with bootstrap. For information on using the jQuery integration, see: jQuery self-hosted integration.

This procedure creates a basic Bootstrap integration containing a TinyMCE editor.


  1. In an HTML file, add a source script for Bootstrap JS.

    If the project loads Bootstrap from, use the script provided by the Bootstrap CDN, which includes the integrity and crossorigin attributes.

  2. To source an independent deployment of TinyMCE, add the following source script to either the <head> or the end of the <body> of the HTML file, such as:

    <script src="/path/to/tinymce.min.js"></script>

    For information on self-hosting TinyMCE, see: Installing TinyMCE.

  3. Add an initialization point for TinyMCE, such as:

      <textarea id="tiny"></textarea>
  4. Add the TinyMCE init script.

        selector: 'textarea#tiny'

Using TinyMCE in a Bootstrap dialog

To render TinyMCE instances inside Bootstrap UI dialogs, add the following code:

Bootstrap 4 or below

// Prevent Bootstrap dialog from blocking focusin
$(document).on('focusin', function(e) {
  if ($(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {

Bootstrap 5 or above

// Prevent Bootstrap dialog from blocking focusin
document.addEventListener('focusin', (e) => {
  if (".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) {

This code is required because Bootstrap blocks all focusin calls from elements outside the dialog. For a working example, try this TinyMCE fiddle.