# Install Txt42 plugin for Editor42

> Install the Txt42 AI assistant in Editor42, our free MIT-licensed editor based on TinyMCE: the plugin in your own Editor42, or one CDN script.

Source: https://txt42.ai/docs/install/editor42  
Section: Installation > Editor42  
Updated: 2026-11-13  
Every page of txt42.ai has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://txt42.ai/llms-full.txt

[Editor42](https://editor42.com) is our free MIT-licensed rich text editor, an auditable fork of TinyMCE 6.8.6 with the same API under the `editor42` global. The Txt42 plugin for TinyMCE runs in it unchanged: the same plugin, the same API key.

*The page shows these as tabs, one at a time: Plugin, CDN.*

## Plugin

### Step 1: Download

Get the Txt42 plugin for the Editor42 you already run.

[Download Plugin](https://txt42.ai/download/chat-gpt-tinymce.zip)

### Step 2: Unpack

Unpack the archive into the Editor42 folder, the one that holds `plugins/`. The plugin lands here:

```text
editor42/
  plugins/
    chat-gpt/
      plugin.js
      plugin.min.js
```

### Step 3: Enable

Enable the Txt42 add-on in the Editor42 config and put its `Txt42Chat` and `Txt42Commands` buttons on the toolbar:

```js
editor42.init({
    selector: "#editor",
    plugins: "chat-gpt",
    toolbar: "undo redo | bold italic | Txt42Chat Txt42Commands",

    // apiKey: "...",
    // Get your own key in the Dashboard: https://txt42.ai/dashboard
});
```

### ✓ Ready to Use

## CDN

### Step 1: Add the CDN Script

One script loads Editor42 from our cloud with the Txt42 plugin enabled and preconfigured, always the latest version. Start the editor with `editor42.init()` in `window.onEditorLoaded`, as below.

```html
<!-- This div will be replaced with the editor -->
<div id="editor"></div>

<!-- Place this before adding the script with Txt42
     to correctly process the moment when it is loaded -->
<script type="text/javascript">
    window.onEditorLoaded = function() {
        // tinymce.init(...) also works: the global is aliased for compatibility
        editor42.init({
            selector: "#editor",
        });
    }
</script>

<!-- Load the script. The API key can be found in the Dashboard -->
<script type="text/javascript"
        src="https://cloud.n1ed.com/v/latest/sdk/n1ed.js?apiKey=MYAPIKEY">
</script>
```

**Txt42 is part of the N1ED family** — its scripts are served from N1ED's cloud, `cloud.n1ed.com`, the one loader every product of the family shares.

You can copy this snippet into any place of your `<body>` tag, but the scripts must go below the editor placeholder and their order is important.

### Step 2: Set API key

Get your own API key in the [Dashboard](https://txt42.ai/dashboard) and put it into the URL after `?apiKey=` in place of `MYAPIKEY`. The Dashboard is also where you configure the AI provider keys, the chat and the toolbar of that key.

Please don't pass your API key as a parameter to `editor42.init()`. The CDN script expects it to be present at load time, passed in the URL.

### ✓ Ready to Use

## Configuration

Configure your Txt42 Editor42 installation in the Dashboard: the AI provider keys of the Enterprise plan, the chat and the toolbar buttons, all without touching the code. See [Configuration](https://txt42.ai/docs/configuration).

[Dashboard](https://txt42.ai/dashboard)
