TinyMCE Theme options

Overview

TinyMCE breaks the core editor into several parts to optimize load times. The theme provides the editor UI-related logic and components such as buttons, dialogs, and menus. The currently supported theme, "Silver", is automatically loaded unless its files are missing from the core TinyMCE distribution or are hosted separately.

theme_url

This option allows you to specify a custom location for the theme files. Use this option only when you need to load the theme files from a location that is not bundled with the core TinyMCE distribution. The current supported theme is called Silver.

Type: String

The theme_url option should only be used in specific deployment scenarios:

CDN Loading:

When loading the theme files from a CDN or external server while TinyMCE core files are loaded from a different location:

tinymce.init({
  selector: 'textarea',
  theme_url: 'https://cdn.example.com/tinymce/themes/silver/theme.min.js'
});

Custom Deployment Structure:

During development or when using a custom deployment structure where the theme files are in different directories:

tinymce.init({
  selector: 'textarea',
  theme_url: '<path_to_tinymce_theme>/themes/silver/theme.min.js'
});