# Migration from TinyMCE

> Move any TinyMCE version to Editor42, the MIT-licensed fork: swap the script, the CDN URL or the framework package, and keep your configuration and plugins.

Source: https://editor42.com/docs/migration/from-tinymce  
Section: Migration > Migration from TinyMCE  
Every page of editor42.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://editor42.com/llms-full.txt

From some point, TinyMCE changed its license from MIT to GPL. Editor42 is built from the latest MIT-licensed state of TinyMCE, so you get a maintained, secure rich text editor under a permissive license without rewriting your integration.

You can migrate from any version of TinyMCE — the process is the same regardless of which release you are currently on, and in most cases the switch is seamless.

## Step by Step

### Self-Hosted

Replace the TinyMCE directory with the Editor42 distribution and update your script tag:

```diff
- <script src="/js/tinymce/tinymce.min.js"></script>
+ <script src="/js/editor42/editor42.min.js"></script>
```

### CDN

Update the CDN URL:

```diff
- <script src="https://cdn.tiny.cloud/1/KEY/tinymce/6/tinymce.min.js"></script>
+ <script src="https://cdn.editor42.com/editor42/latest/editor42.min.js"></script>
```

### Init Call

```diff
- tinymce.init({
+ editor42.init({
    selector: '#my-editor'
  });
```

The old `tinymce.init()` call will also work — Editor42 sets `window.tinymce` as an alias for compatibility.

### Framework Components

If your project uses one of TinyMCE's framework wrappers, there is an Editor42 fork of it with the same props, events and component names. Uninstall the old one, install ours, change the import:

| TinyMCE | Editor42 |  |
|---|---|---|
| `@tinymce/tinymce-react` | `@editor42/editor42-react` | [React](https://editor42.com/docs/install/react) |
| `@tinymce/tinymce-vue` | `@editor42/editor42-vue` | [Vue](https://editor42.com/docs/install/vue) |
| `@tinymce/tinymce-angular` | `@editor42/editor42-angular` | [Angular](https://editor42.com/docs/install/angular) |
| `@tinymce/tinymce-svelte` | `@editor42/editor42-svelte` | [Svelte](https://editor42.com/docs/install/svelte) |
| `@tinymce/tinymce-jquery` | `@editor42/editor42-jquery` | [jQuery](https://editor42.com/docs/install/jquery) |
| `@tinymce/tinymce-webcomponent` | `@editor42/editor42-webcomponent` | [Web Component](https://editor42.com/docs/install/web-component) |

The old prop and setting names (`tinymceScriptSrc`, `cloudChannel`, `TINYMCE_SCRIPT_SRC`, the `:tinymce` selector, the `<tinymce-editor>` tag) keep working as deprecated aliases, and every API-key setting is still accepted but does nothing — no key is read, stored or sent anywhere. Each component page above lists its own aliases.

If you install the editor from NPM rather than a script tag, `tinymce` becomes [`editor42`](https://editor42.com/docs/install/npm).

## API Compatibility

TinyMCE APIs, events, configuration options, and plugins work with Editor42. Both `window.editor42` and `window.tinymce` are available by default, so existing code that references `window.tinymce` will continue to work as-is.

If you want to disable the `window.tinymce` alias — reducing compatibility but getting rid of that TinyMCE-branded global — set `EDITOR42_NO_SHIM` before loading Editor42:

```html
<script>window.EDITOR42_NO_SHIM = true;</script>
```

## What your own code may need to change

Your configuration and the API carry over unchanged. What changes are the brand-bearing names inside the editor, so code that reaches into the editor's DOM or calls its internals by name needs these edits:

- **CSS for the editor's UI**: `.tox` and `.tox-*` are `.editor42-t` and `.editor42-t-*`. A selector on a bare `.tox` matches nothing ([UI classes](https://editor42.com/docs/about-this-fork/technical-specs#editor-ui-css-classes-the-tox-namespace)).
- **CSS or scripts for the editable content**: the `mce-*` classes are `editor42-m-*`, and the `data-mce-*` and `data-ephox-*` attributes are `data-editor42-*` ([content classes](https://editor42.com/docs/about-this-fork/technical-specs#editable-content-css-classes-the-mce-namespace), [data attributes](https://editor42.com/docs/about-this-fork/technical-specs#dom-data-attributes)).
- **`editor.execCommand()` with an `mce` command**: `mceInsertContent` is `editor42InsertContent`, `mceLink` is `editor42Link`, and so on; the old names are not kept ([commands](https://editor42.com/docs/about-this-fork/technical-specs#editor-commands)).
- **Content saved with `mceNonEditable` or `mceEditable`**: set `noneditable_class: 'mceNonEditable'` (and `editable_class: 'mceEditable'`) in your config, because the defaults follow the rename ([option defaults](https://editor42.com/docs/about-this-fork/technical-specs#option-defaults-that-embed-class-names)).
- **`window.tinyMCEPreInit`**: set `window.editor42PreInit` instead; the old name is ignored ([globals](https://editor42.com/docs/about-this-fork/technical-specs#compatibility-shims)).
- **Clipboard code that reads `x-tinymce/html`**: the MIME type is `x-editor42/html` ([MIME type](https://editor42.com/docs/about-this-fork/technical-specs#mime-type)).
- **The `tinymce-5` skins**: they are `editor42-5` and `editor42-5-dark`, while `oxide` and `default` keep their names ([skins](https://editor42.com/docs/about-this-fork/technical-specs#skin-directories)).

## Technical Details

Editor42 rebrands the editor's identifiers — CSS classes, global variables, hooks, and MIME types — while keeping the TinyMCE 6 API unchanged. Its own version, `42.0.1`, is reported through `minorVersion`; `majorVersion` stays `'6'`, because that field states the API level your code branches on and Editor42 implements TinyMCE 6 exactly. For the complete list of renamed identifiers and the reasoning behind the versioning scheme, see [Technical Details & Compatibility](https://editor42.com/docs/about-this-fork/technical-specs).
