---
title: "tinymce.AddOnManager"
description: "This class handles the loading of add-ons and their language packs. ThemeManager and PluginManager are instances of AddOnManager, and manage themes and plugins."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/apis/tinymce.addonmanager/"
md_url: "https://www.tiny.cloud/docs/tinymce/6/apis/tinymce.addonmanager/index.md"
version: "6"
last_updated: "2022-06-27T01:45:26Z"
tokens: 739
---
Important This page documents TinyMCE 6. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../../latest/apis/tinymce.addonmanager/).
# tinymce.AddOnManager

This class handles the loading of add-ons and their language packs. ThemeManager and PluginManager are instances of AddOnManager, and manage themes and plugins.

## Summary

### Methods

| Name | Summary | Defined by |
| --- | --- | --- |
| [add()](#add) | Adds a instance of the add-on by it’s short name. | `AddOnManager` |
| [get()](#get) | Returns the specified add on by the short name. | `AddOnManager` |
| [load()](#load) | Loads an add-on from a specific url. | `AddOnManager` |
| [requireLangPack()](#requireLangPack) | Loads a language pack for the specified add-on. | `AddOnManager` |

## Methods

### add()

```javascript
add(id: String, addOn: tinymce.Theme | tinymce.Plugin): tinymce.Theme | tinymce.Plugin
```
Adds a instance of the add-on by it’s short name.

#### Examples

```javascript
// Create a simple plugin
const TestPlugin = (ed, url) => {
  ed.on('click', (e) => {
    ed.windowManager.alert('Hello World!');
  });
};

// Register plugin using the add method
tinymce.PluginManager.add('test', TestPlugin);

// Initialize TinyMCE
tinymce.init({
  ...
  plugins: '-test' // Init the plugin but don't try to load it
});
```

#### Parameters

- `id (String)` - Short name/id for the add-on.
- `addOn (Theme | Plugin)` - Theme or plugin to add.

#### Return value

- `Theme` - The same theme or plugin instance that got passed in.
- `Plugin` - The same theme or plugin instance that got passed in.

### get()

```javascript
get(name: String): tinymce.Theme | tinymce.Plugin
```
Returns the specified add on by the short name.

#### Parameters

- `name (String)` - Add-on to look for.

#### Return value

- `Theme` - Theme or plugin add-on instance or undefined.
- `Plugin` - Theme or plugin add-on instance or undefined.

### load()

```javascript
load(name: String, addOnUrl: String): Promise
```
Loads an add-on from a specific url.

#### Examples

```javascript
// Loads a plugin from an external URL
tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/plugin.js');

// Initialize TinyMCE
tinymce.init({
  ...
  plugins: '-myplugin' // Don't try to load it again
});
```

#### Parameters

- `name (String)` - Short name of the add-on that gets loaded.
- `addOnUrl (String)` - URL to the add-on that will get loaded.

#### Return value

- `Promise` - A promise that will resolve when the add-on is loaded successfully or reject if it failed to load.

### requireLangPack()

```javascript
requireLangPack(name: String, languages: String)
```
Loads a language pack for the specified add-on.

#### Parameters

- `name (String)` - Short name of the add-on.
- `languages (String)` - Optional comma or space separated list of languages to check if it matches the name.
