Migrating from TinyMCE 6 to TinyMCE 8
Overview
TinyMCE has evolved significantly from version 6 to version 8.0, introducing architectural improvements, modern UI enhancements, stricter security defaults, and updated plugin structures. This comprehensive guide outlines the critical breaking changes, recommended migration action steps, and top-level configuration adjustments required to upgrade from TinyMCE v6 to v8.0.
This guide provides a complete migration path from TinyMCE 6 to TinyMCE 8, covering all changes across versions 7 and 8 in a single comprehensive document.
Key Changes
Plugin Ecosystem
The TinyMCE plugin ecosystem underwent changes starting in version 7.0, with several plugins being removed or reclassified.
-
Removed Plugins (no longer available as of TinyMCE 7.0):
-
template: Removed in 7.0. Replaced by the premium Templates plugin.
-
-
Now Premium Only (removed in 6.0, before this migration path):
-
imagetools: Removed in 6.0. Replaced by the premium Enhanced Image Editing feature, available via theeditimageplugin introduced in TinyMCE 6.0. -
textcolor: Removed in 6.0. Use the premium Color Picker functionality instead.
-
|
If you’re migrating from TinyMCE 6, these plugins ( |
Plugin Migration Examples
-
template(removed in v7):-
Use the premium Templates plugin or implement custom modal dialogs.
-
Consider using Advanced Templates for complex templating needs.
-
-
imagetools(removed in v6):-
Use the premium Enhanced Image Editing feature.
-
Ensure you have a valid commercial license for the Enhanced Image Editing feature.
-
-
textcolor(removed in v6):-
Use the premium Color Picker functionality.
-
Ensure you have a valid commercial license for the Color Picker feature.
-
Content Structure
The content structure requirements have been updated:
-
Requirement: All editor content must be enclosed in block elements (e.g.,
<p>).
Configuration Changes
Several configuration options have been updated across versions 7 and 8:
-
New Defaults:
-
highlight_on_focus: Now defaults totrue(adds focus outline to editors) -
convert_unsafe_embeds: Now defaults totrue(converts object/embed elements to safer alternatives) -
sandbox_iframes: Now defaults totrue(adds sandbox attribute to iframes) -
sandbox_iframes_exclusions: List of URL hosts to exclude from iframe sandboxing -
license_key: Must be set togplor a valid license key -
New
crossoriginconfiguration option for cross-origin resource loading
-
tinymce.init({
selector: "textarea",
highlight_on_focus: true,
convert_unsafe_embeds: true,
sandbox_iframes: true,
sandbox_iframes_exclusions: ["youtube.com", "vimeo.com"],
license_key: "T8LK:...", // New format required
crossorigin: (url, resourceType) => 'anonymous'
});
Licensing Changes (GPL v2+ and Commercial)
TinyMCE 8.0 introduces significant changes to the licensing system:
-
New Format: License keys now use the prefix
T8LK:for commercial licenses orGPL+T8LK:for GPL with Premium Features -
License Key Manager: Self-hosted commercial deployments require the new License Key Manager addon
-
Mandatory License Key: All deployments now require a valid license key
tinymce.init({
selector: "textarea",
license_key: "T8LK:your-license-key" // New format required
});
License Migration checklist:
-
Contact support for new TinyMCE 8.0 license key or use GPL for the open source version
-
Install license key manager addon for commercial licenses
-
Update configuration with new license key format
-
Test editor functionality with new license
-
Verify all premium features are working
API Changes
Deprecated in TinyMCE 8
editor.selection.setContent
The editor.selection.setContent API has been deprecated and will be removed in TinyMCE 9.
// Deprecated in TinyMCE 8, will be removed in 9
editor.selection.setContent('<p>New content</p>');
// New approach
editor.insertContent('<p>New content</p>');
Migration checklist:
-
Replace all instances of
editor.selection.setContentwitheditor.insertContent -
Update custom plugins that use the old method
-
Test content insertion in your editor instances
fire() method
The fire() method has been replaced by dispatch() for event handling. The fire() method will be removed in TinyMCE 9 to avoid confusion with its name.
// Deprecated in TinyMCE 8, will be removed in 9
editor.fire('someEvent');
// New approach
editor.dispatch('someEvent');
Impact: This change aligns TinyMCE with modern event handling conventions, making the API more intuitive for developers.
Migration checklist:
-
Search codebase for all uses of the
fire()method -
Replace each instance with
dispatch() -
Review and update third-party plugins
-
Test all custom event handling
addButton, addMenuItem, and windowManager.open
The addButton, addMenuItem, and windowManager.open methods have been replaced by the editor.ui.registry.* API.
// Deprecated in TinyMCE 8, will be removed in 9
editor.addButton('myButton', {
text: 'My Button',
onclick: function() {
editor.insertContent('Hello World!');
}
});
// New approach
editor.ui.registry.addButton('myButton', {
text: 'My Button',
onAction: function() {
editor.insertContent('Hello World!');
}
});
Migration checklist:
-
Replace all instances of
editor.addButtonwitheditor.ui.registry.addButton -
Replace all instances of
editor.addMenuItemwitheditor.ui.registry.addMenuItem -
Replace all instances of
editor.windowManager.openwitheditor.windowManager.open -
Update custom plugins that use the old methods
-
Test button and menu functionality in your editor instances
editor.documentBaseUrl
The editor.documentBaseUrl property has been removed. Use editor.editorManager.documentBaseURI.getURI() instead.
Migration Steps:
-
Search your codebase for all instances of
editor.documentBaseUrl -
Replace them with
tinymce.activeEditor.documentBaseURI.getURI()(oreditor.documentBaseURI.getURI()if you have aneditorreference) -
Test any functionality that depends on document base URL
// Deprecated in TinyMCE 8, will be removed in 9
const baseUrl = editor.documentBaseUrl;
// New approach
const baseUrl = editor.editorManager.documentBaseURI.getURI();
Impact: This change improves URL handling consistency by removing an undocumented API that was not aligned with the documented documentBaseURI property.
Migration checklist:
-
Search your codebase for all instances of
editor.documentBaseUrl. -
Replace them with
tinymce.activeEditor.editorManager.documentBaseURI.getURI()(oreditor.editorManager.documentBaseURI.getURI()if you have aneditorreference).
skipFocus and skip_focus Consolidation
The skipFocus and skip_focus options for the ToggleToolbarDrawer command were consolidated into a single, more consistent argument in TinyMCE 8.0. For more information, see Available Commands.
Impact:
-
Reduces API complexity
-
Clarifies intended behavior
-
Requires updating command calls
Migration Steps:
-
Locate all instances of
ToggleToolbarDrawercommand usage -
Replace
skipFocuswithskip_focusin command parameters -
Test toolbar drawer behavior
// Old approach (deprecated in TinyMCE 8)
editor.execCommand('ToggleToolbarDrawer', false, { skipFocus: true });
// New approach (recommended)
editor.execCommand('ToggleToolbarDrawer', false, null, { skip_focus: true });
Migration checklist:
-
Locate all instances of
ToggleToolbarDrawercommand usage -
Replace
skipFocuswithskip_focusin command options -
Update any custom plugins using this command
-
Test toolbar drawer behavior after changes
Removed Methods
Legacy API Methods
The InsertOrderedList and InsertUnorderedList commands were removed from TinyMCE core in version 6.0 and are now provided by the Lists plugin.
Autocompleter ch property
The ch configuration property for autocompleters was removed in TinyMCE 7.0. Use the trigger property instead.
Migration Steps:
-
Replace
ch: '<string>'withtrigger: '<string>'in autocompleter configurations -
Test autocompleter functionality
-
Update any custom autocompleter implementations
// Old TinyMCE 6 configuration
editor.ui.registry.addAutocompleter('myautocompleter', {
ch: '@',
minChars: 0,
fetch: function(pattern) {
return [
{ value: 'john@example.com', text: 'John Doe' },
{ value: 'jane@example.com', text: 'Jane Smith' }
];
}
});
// New TinyMCE 7+ configuration
editor.ui.registry.addAutocompleter('myautocompleter', {
trigger: '@',
minChars: 0,
fetch: function(pattern) {
return [
{ value: 'john@example.com', text: 'John Doe' },
{ value: 'jane@example.com', text: 'Jane Smith' }
];
}
});
Migration checklist:
-
Replace
ch: '<string>'withtrigger: '<string>'in autocompleter configurations -
Test autocompleter functionality
-
Update any custom autocompleter implementations
remove_trailing_brs property
The remove_trailing_brs setting was removed from the DomParser API in TinyMCE 7.0, after being deprecated in TinyMCE 6.5. For more information on DomParser, see DomParser API.
Impact:
-
DomParser no longer supports the
remove_trailing_brsoption -
This affects custom DomParser configurations
-
May impact content parsing behavior
Migration checklist:
-
Remove
remove_trailing_brsfrom DomParser configurations -
Test content parsing behavior
-
Update any custom DomParser implementations
Text Pattern Changes
TinyMCE 7.0 updated the default behavior of text_patterns to apply formats when the user presses the Space key instead of Enter.
Impact:
-
Markdown-style formatting now triggers on Space key press
-
Previous Enter key behavior can be restored by configuring
trigger: 'enter' -
This affects all text patterns including headings, lists, blockquotes, and horizontal rules
Migration Steps:
-
Test existing text pattern behavior
-
Update configurations if Enter key triggering is required
-
Review user experience with new Space key triggering
-
Consider updating user documentation about text pattern behavior
// Default TinyMCE 7+ behavior (Space key trigger)
tinymce.init({
selector: "textarea",
text_patterns: [
{ start: '#', format: 'h1', trigger: 'space' },
{ start: '##', format: 'h2', trigger: 'space' },
{ start: '1.', cmd: 'InsertOrderedList', trigger: 'space' },
{ start: '*', cmd: 'InsertUnorderedList', trigger: 'space' },
{ start: '>', cmd: 'mceBlockQuote', trigger: 'space' }
]
});
// Restore previous behavior (Enter key trigger)
tinymce.init({
selector: "textarea",
text_patterns: [
{ start: '#', format: 'h1', trigger: 'enter' },
{ start: '##', format: 'h2', trigger: 'enter' },
{ start: '1.', cmd: 'InsertOrderedList', trigger: 'enter' },
{ start: '*', cmd: 'InsertUnorderedList', trigger: 'enter' },
{ start: '>', cmd: 'mceBlockQuote', trigger: 'enter' }
]
});
Migration checklist:
-
Test existing text pattern behavior with Space key triggering
-
Update configurations if Enter key triggering is required
-
Review user experience with new Space key triggering
-
Update user documentation about text pattern behavior
table_responsive_width replaced by table_sizing_mode
The table_responsive_width option was replaced by table_sizing_mode in TinyMCE 7.0.
Migration Steps:
-
Replace
table_responsive_widthwithtable_sizing_modein your configuration -
Update the option value to match the new API
-
Test table responsive behavior
// Old TinyMCE 6 configuration
tinymce.init({
selector: "textarea",
table_responsive_width: true
});
// New TinyMCE 7+ configuration
tinymce.init({
selector: "textarea",
table_sizing_mode: "responsive"
});
Migration checklist:
-
Replace
table_responsive_widthwithtable_sizing_modein your configuration -
Update the option value to match the new API
-
Test table responsive behavior
Plugin Changes
Template Plugin Removal
The template plugin was removed in TinyMCE 7.0. If you were using this plugin, you need to migrate to the premium Templates plugin.
Migration Steps:
1. Remove template from your plugins list
2. Add templates to your plugins list
3. Update your configuration to use the new Templates plugin API
Migration checklist:
-
Remove
templateplugin from configuration if used -
Evaluate need for premium Templates plugin (advtemplate)
-
Remove all template-related configuration options
-
Update any custom template implementations
-
Test template functionality if migrating to premium plugin
Image Tools Plugin Removal
|
This section applies only if you’re upgrading from TinyMCE 5 or earlier. The |
The imagetools plugin was removed in TinyMCE 6.0. If you were using this plugin, you need to migrate to the premium Enhanced Image Editing feature.
Migration Steps:
1. Remove imagetools from your plugins list
2. Add editimage to your plugins list (premium feature)
3. Ensure you have a valid commercial license for the Enhanced Image Editing feature
4. Update any custom image editing configurations
Migration checklist:
-
Remove
imagetoolsfrom plugins list -
Add
editimageto plugins list (premium feature) -
Ensure you have a valid commercial license for Enhanced Image Editing
-
Update any custom image editing configurations
-
Test image editing functionality
// Old TinyMCE 5 configuration
tinymce.init({
selector: "textarea",
plugins: "imagetools",
imagetools_toolbar: "rotateleft rotateright | flipv fliph | editimage imageoptions"
});
// New TinyMCE 6+ configuration
tinymce.init({
selector: "textarea",
plugins: "editimage", // Premium feature
editimage_toolbar: "rotateleft rotateright | flipv fliph | editimage imageoptions"
});
Text Color Plugin Removal
|
This section applies only if you’re upgrading from TinyMCE 5 or earlier. The |
The textcolor plugin was removed in TinyMCE 6.0. If you were using this plugin, you need to migrate to the premium Color Picker functionality.
Migration checklist:
-
Remove
textcolorfrom plugins list -
Add
colorpickerto plugins list (premium feature) -
Ensure you have a valid commercial license for Color Picker
-
Update any custom color picker configurations
-
Test color picker functionality
// Old TinyMCE 5 configuration
tinymce.init({
selector: "textarea",
plugins: "textcolor",
toolbar: "forecolor backcolor"
});
// New TinyMCE 6+ configuration
tinymce.init({
selector: "textarea",
plugins: "colorpicker",
toolbar: "forecolor backcolor"
});
Media URL Resolver Changes
In TinyMCE 6 and earlier, the media_url_resolver option provided resolve and reject callbacks, rather than a Promise. In TinyMCE 7.0, the media_url_resolver option now requires a Promise to be returned.
Migration checklist:
-
Update
media_url_resolverimplementations to return Promises instead of using callbacks -
Remove
resolveandrejectcallback parameters from resolver functions -
Test media embedding functionality with updated resolver
-
Update any custom media URL resolver implementations
// Old TinyMCE 6 approach
tinymce.init({
selector: "textarea",
media_url_resolver: function(data, resolve, reject) {
// Custom logic here
resolve(data.url);
}
});
// New TinyMCE 7+ approach
tinymce.init({
selector: "textarea",
media_url_resolver: function(data) {
return new Promise(function(resolve, reject) {
// Custom logic here
resolve(data.url);
});
}
});
UI and UX Changes
Table Height Changes
TinyMCE 7.0 introduced changes to how table heights are handled.
In TinyMCE 7.0, the way cell and row heights are applied to tables has been changed:
-
When a table is resized using the resize handles or the "Row properties" dialog, existing
heightstyles will be stripped fromtd/thelements where applicable and only applied to thetableelement andtrelements.
Notification Close Button
In previous versions of TinyMCE, notifications were able to be displayed without a close button (X). Accessibility is an important component of the editor, and when this button is not in a notification, that notification cannot be closed via keyboard navigation.
In TinyMCE 7.0, notifications are now forced to have a close button to improve accessibility.
Split Button Changes
In TinyMCE 8.0, split toolbar buttons now render as two distinct components: one for the primary action and one for the dropdown chevron.
This structural change modifies the DOM layout of split buttons and may break custom CSS rules that rely on the previous structure.
Migration Steps:
-
Update your split button usage to align with the new structure, including support for the
chevronTooltipoption. Refer to Split Toolbar Buttons for updated configuration details. -
Test the rendering and interaction of split buttons in your editor to verify expected behavior.
Migration checklist:
-
Confirm whether your project uses a custom skin.
-
Rebuild your custom skin using the TinyMCE 8.0 codebase. See Creating a Skin for instructions.
-
Update your split button usage to align with the new structure, including support for the
chevronTooltipoption. Refer to Split Toolbar Buttons for updated configuration details. -
Test the rendering and interaction of split buttons in your editor to verify expected behavior.
Security Changes
Sandbox Iframes
In TinyMCE 7.0, the default for sandbox_iframes changed from false to true, meaning that all iframe elements inserted into the editor are given the sandbox="" attribute by default, preventing most actions, including scripting and same-origin access, which may break existing editor content or produce undesirable effects.
To prevent any expected iframes from being sandboxed, we recommend adding the source domains of such iframes to the new sandbox_iframes_exclusions option list, and including the domains in the default list where necessary. To prevent all iframes from being sandboxed, set the option sandbox_iframes to false in your editor configuration.
Convert Unsafe Embeds
In TinyMCE 7.0, the default value for convert_unsafe_embeds changed from false to true, meaning that all object and embed tags are automatically converted to different elements when inserted to the editor.
DOMPurify Update
TinyMCE 8.0 updates the DOMPurify dependency to version 3.2.6 and enables the SAFE_FOR_XML flag by default. This is a breaking change: content that previously passed sanitization in TinyMCE 7 may now be stripped or altered during the sanitization process.
Impact:
-
Stricter content sanitization
-
Some previously allowed content may be stripped
-
XML-specific sanitization rules are now applied
Migration checklist:
-
Review existing content for HTML comments containing tags
-
Test content sanitization behavior with DOMPurify 3.2.6
-
Update content workflows if comments are being stripped unexpectedly
-
Consider enabling
allow_html_in_commentsif needed (with security awareness) -
Test Internet Explorer conditional comments if used
-
Verify attributes with HTML-like values are handled correctly
// Content that may be affected by stricter sanitization
const content = '<div><script>alert("test")</script></div>';
// Test sanitization behavior
const sanitized = editor.dom.sanitize(content);
console.log('Sanitized content:', sanitized);
Cross-Origin Resource Loading
TinyMCE 8.0 introduces stricter controls for cross-origin resource loading.
New Configuration:
-
crossoriginattribute support for external resources -
Enhanced security for loading external content
-
Better control over resource loading policies
Migration checklist:
-
Verify script tag attributes for Cloud deployments.
-
Configure
crossoriginfunction if using cross-origin resources. -
Test resource loading in your deployment environment.
-
Review
content_cssconfiguration if using cross-origin stylesheets.
Service Changes
Java Swing Integration Deprecation
TinyMCE’s Java Swing integration has been deprecated in TinyMCE 8.0 and will reach end-of-life as of December 31, 2025.
Migration Steps:
-
Evaluate alternative integration options
-
Plan migration timeline to complete before December 31, 2025
Migration checklist:
-
Evaluate alternative integration options
-
Plan migration timeline to complete before December 31, 2025
Medical English Dictionary Discontinuation
The "Medical English (UK)" dictionary has been discontinued and is no longer available in TinyMCE 8.0.
Migration checklist:
-
Remove "Medical English (UK)" from spellchecker configurations
-
Remove any custom dictionary integrations related to Medical English
-
Test spellchecker functionality with remaining dictionaries
-
Configure alternative medical dictionary if required
Transition from Java WAR Files to Containerized Services
TinyMCE 8.0 no longer includes Java WAR files for backend services like the spell checker. Customers are required to migrate to modern Docker/OCI containers for self-hosted deployments.
Migration checklist:
-
Inventory current WAR file deployments
-
Review containerization requirements for your environment
-
Plan transition timeline to containerized services
-
Set up container infrastructure (Docker/Kubernetes)
-
Deploy and test containerized services
-
Update service connection configurations
-
Contact Tiny Support if legacy WAR files are still needed
Migration Tips
License Migration checklist:
-
Contact support for new TinyMCE 8.0 license key or use GPL for the open source version
-
Install license key manager addon for commercial licenses
-
Update configuration with new license key format
-
Test editor functionality with new license
-
Verify all premium features are working
Custom Skin Migration checklist:
-
Confirm whether your project uses a custom skin.
-
Rebuild your custom skin using the TinyMCE 8 codebase. See Creating a Skin for instructions.
-
Update your split button usage to align with the new structure, including support for the
chevronTooltipoption. Refer to Split Toolbar Buttons for updated configuration details. -
Test the rendering and interaction of split buttons in your editor to verify expected behavior.
General Migration checklist:
-
License key is updated to new format (
T8LK:prefix) -
License Key Manager addon is installed (commercial licenses)
-
All deprecated API methods have been replaced (
editor.selection.setContent,editor.fire(), etc.) -
Custom skins have been rebuilt for TinyMCE 8 compatibility
-
DOMPurify sanitization behavior is tested with your content
-
Cross-origin resource loading is configured if needed
-
All premium features are working correctly
-
Media URL resolver has been updated to use Promises
-
Autocompleter configuration uses
triggerinstead ofch -
Template plugin has been replaced with premium Templates plugin if needed
-
Language pack files are updated to RFC5646 format
-
Accessibility checker configurations are updated for W3C standards
-
Empty file references are removed from build processes
-
Java Swing integration migration is planned (if applicable)
-
Medical English dictionary references are removed
-
WAR file deployments are migrated to containerized services
-
Split button CSS is updated for custom skins
-
Table height handling is tested
-
Notification close button behavior is verified
-
Sandbox iframes configuration is reviewed
-
Convert unsafe embeds behavior is tested
Additional Resources
-
Paid users can contact our Technical Support team for help.