Show: Inherited Protected Private Deprecated

# AlloyEditor Class

Defined in: `src/ui/react/src/adapter/main.js:12`

AlloyEditor static object.

## Index

### Methods

- editable static
- getBasePath static
- getButtons static
- getUrl static
- implementEventTarget static
- loadLanguageResources static
- registerBridgeButton static

### Properties

- Buttons static
- regexBasePath static
- Toolbars static

### Events

- languageResourcesLoaded

## Methods

### `editable`

(

- `node`
- `config`

)
Object static

Defined in `src/ui/react/src/adapter/main.js:18`

Creates an instance of AlloyEditor.

#### Parameters:

- `node` String | Node

  The Node ID or HTMl node, which AlloyEditor should use as an editable area.

- `config` Object

  Configuration attributes for the current instance of AlloyEditor.

#### Returns:

Object:

An instance of Core

### `getBasePath`

() String static

Defined in `src/ui/react/src/adapter/main.js:36`

The full URL for the AlloyEditor installation directory. It is possible to manually provide the base path by setting a global variable named `ALLOYEDITOR_BASEPATH`. This global variable must be set before the editor script loading.

#### Returns:

String:

The found base path

### `getButtons`

(

- `buttons`

)
Function static

Defined in `src/ui/react/src/adapter/main.js:203`

Returns the required plugin names needed for a given plugin if it is already registered or an empty array.

#### Parameters:

- `buttons` Array

  An array of buttons or plugin names.

#### Returns:

Function:

A function that can be invoked to resolve the requested button names.

### `getUrl`

(

- `resource`

)
String static

Defined in `src/ui/react/src/adapter/main.js:130`

Gets the full URL for AlloyEditor resources. By default, URLs returned by this function contain a querystring parameter ("t") set to the {@link CKEDITOR#timestamp} value.

#### Parameters:

- `resource` String

  The resource whose full URL we want to get. It may be a full, absolute, or relative URL.

#### Returns:

String:

The full URL.

### `implementEventTarget`

() static

Defined in `src/ui/react/src/adapter/main.js:157`

Implements event firing and subscribing via CKEDITOR.event.

### `loadLanguageResources`

(

- `callback`

)
static

Defined in `src/ui/react/src/adapter/main.js:84`

Detects and load the corresponding language file if AlloyEditor language strings are not already present. The function fires a languageResourcesLoaded event

#### Parameters:

- `callback` Function

  Optional callback to be called when AlloyEditor loads the language resource.

### `registerBridgeButton`

(

- `buttonName`
- `pluginName`

)
static

Defined in `src/ui/react/src/adapter/main.js:221`

Register a button and try to get its required plugins.

#### Parameters:

- `buttonName` String

  The name of the button.

- `pluginName` String

  The name of the plugin that registers the button.

## Properties

### ``

Object

Defined in `src/ui/react/src/adapter/main.js:4`

An object containing all currently registered plugins in AlloyEditor.

### `Buttons`

Object static

Defined in `src/ui/react/src/adapter/main.js:178`

And object, containing all currently registered buttons in AlloyEditor.

### `regexBasePath`

RegExp static

Defined in `src/ui/react/src/adapter/main.js:169`

Regular expression which should match the script which have been used to load AlloyEditor.

### `Toolbars`

Object static

Defined in `src/ui/react/src/adapter/main.js:187`

And object, containing all currently registered toolbars in AlloyEditor.

## Events

### `languageResourcesLoaded`

Defined in `src/ui/react/src/adapter/main.js:196`

Fired when AlloyEditor detects the browser language and loads the corresponding language file. Once this event is fired, AlloyEditor.Strings will be populated with data.