# Install Blk42 plugin for Editor42

> Install Blk42 in Editor42, our free MIT-licensed editor based on TinyMCE: the plugin in your own Editor42, the ready-to-use bundle, or one CDN script.

Source: https://blk42.com/docs/install/editor42  
Section: Installation > Editor42  
Every page of blk42.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://blk42.com/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 Blk42 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, Ready-to-Use Bundle, CDN.*

## Plugin

### Step 1: Download

Get the Blk42 plugin for the Editor42 you already run.

[Download Plugin](https://blk42.com/download/blk42-tinymce.zip)

### Step 2: Unpack

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

```text
editor42/
  plugins/
    blk42/
      plugin.js
      plugin.min.js
```

### Step 3: Enable

Enable the Blk42 add-on in the Editor42 config:

```js
editor42.init({
    selector: "#editor",
    plugins: "image,link,blk42",

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

### ✓ Ready to Use

## Ready-to-Use Bundle

### Step 1: Download

The ready-to-use bundle (ZIP) already contains the Blk42 plugin in a fully preconfigured, **TinyMCE-compatible** environment. The editor inside is [**Editor42**](https://editor42.com) — our free MIT-licensed editor, based on **TinyMCE** and fully compatible with it. Use it as an instant preview or copy it into your project.

[Download Bundle](https://blk42.com/download/tinymce-with-blk42.zip)

### Step 2: Unpack

Unpack it somewhere into your webserver public directory. For example:

```text
var/
  www/
    public/
      editor42/
        editor42.min.js
      sample.html
```

You can use `sample.html` to immediately run the editor and check how it works, even outside of a webserver. Then you may want to remove this file if it isn't needed anymore.

### Step 3: Attach to content box

Add the script link onto your page and initialize the editor there, attaching it to the textarea or some div with the content you want to edit.

```html
<script src="/editor42/editor42.min.js"></script>
<script>
    // tinymce.init(...) also works — the global is aliased for compatibility
    editor42.init({
        selector: "#content",
        plugins: "blk42",

        // apiKey: "...",
        // Get your own key in the Dashboard: https://blk42.com/dashboard
    });
</script>
```

### ✓ Ready to Use

## CDN

### Step 1: Add the CDN Script

One script loads Editor42 from our cloud with the Blk42 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 Blk42
     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=BL42B5RRdemodemodemodemo">
</script>
```

**Blk42 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

After the previous step your editor should load fine with the demo key.

Then use your own API key from the [Dashboard](https://blk42.com/dashboard): replace the demo key in the URL after `?apiKey=` with yours. The Dashboard is also where you configure the Bootstrap or Tailwind options and the custom blocks 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 Blk42 Editor42 installation in the Dashboard: set the Bootstrap or Tailwind options and share your custom blocks between your websites, all without touching the code.

Blk42 uses the editor's own image upload and browse settings (`file_picker_callback`), block backgrounds included. For blocks together with a file manager and an image editor in one plugin, use [N1ED](https://n1ed.com).

[Dashboard](https://blk42.com/dashboard)
