Show: Inherited Protected Private Deprecated

# Core Class

Defined in: `src/ui/react/src/adapter/alloy-editor.js:4`

AlloyEditor main class. Creates instance of the editor and provides the user configuration to the UI.

## Constructor

### `Core`

()

Defined in `src/ui/react/src/adapter/alloy-editor.js:4`

## Index

### Methods

- _getNativeEditor
- _renderUI
- _toElement
- _validateAllowedContent
- _validateToolbars
- destructor
- initializer

### Properties

- allowedContent
- enableContentEditable
- eventsDelay
- extraPlugins
- nativeEditor
- placeholderClass
- removePlugins
- srcNode
- toolbars
- uiNode

## Methods

### `_getNativeEditor`

() Object protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:86`

Retrieves the native CKEditor instance. Having this, the developer may use the API of CKEditor OOTB.

#### Returns:

Object:

The current instance of CKEditor.

### `_renderUI`

() protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:97`

Renders the specified from the user toolbars

### `_toElement`

(

- `value`

)
HTMLElement protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:124`

The function returns an HTML element from the passed value. If the passed value is a string, it should be the Id of the element which have to be retrieved from the DOM. If an HTML Element is passed, the element itself will be returned.

#### Parameters:

- `value` !(String | HTMLElement)

  String, which have to correspond to an HTML element from the DOM, or the HTML element itself. If Id is passed, the HTML element will be retrieved from the DOM.

#### Returns:

HTMLElement:

An HTML element.

### `_validateAllowedContent`

(

- `The`

)
Boolean protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:143`

Validates the allowed content attribute. Look here for more information about the supported values.

#### Parameters:

- `The` Any

  value to be checked

#### Returns:

Boolean:

True if the current value is valid configuration, false otherwise

### `_validateToolbars`

(

- `The`

)
Boolean protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:157`

Validates the value of toolbars attribute

#### Parameters:

- `The` Any

  value to be checked

#### Returns:

Boolean:

True if the current value is valid toolbars configuration, false otherwise

### `destructor`

() protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:55`

Destructor lifecycle implementation for the AlloyEdtor class. Destroys the CKEditor instance and destroys all created toolbars.

### `initializer`

(

- `config`

)
protected

Defined in `src/ui/react/src/adapter/alloy-editor.js:16`

Initializer lifecycle implementation for the AlloyEditor class. Creates a CKEditor instance, passing it the provided configuration attributes.

#### Parameters:

- `config` Object

  Configuration object literal for the editor.

## Properties

### `allowedContent`

Boolean, String, Object

Defined in `src/ui/react/src/adapter/alloy-editor.js:170`

Configures the allowed content for the current instance of AlloyEditor. Look on the official CKEditor API for more information about the valid values.

Default: true

### `enableContentEditable`

Boolean

Defined in `src/ui/react/src/adapter/alloy-editor.js:186`

Specifies whether AlloyEditor set the contenteditable attribute to "true" on its srcNode.

Default: true

### `eventsDelay`

Number

Defined in `src/ui/react/src/adapter/alloy-editor.js:201`

The delay (timeout), in ms, after which events such like key or mouse events will be processed.

### `extraPlugins`

String

Defined in `src/ui/react/src/adapter/alloy-editor.js:212`

Specifies the extra plugins which have to be loaded to the current CKEditor instance in order to make AlloyEditor to work properly.

Default: 'uicore,selectionregion,dragresize,addimages,placeholder,tabletools,tableresize,autolink'

### `nativeEditor`

Object

Defined in `src/ui/react/src/adapter/alloy-editor.js:227`

Retrieves the native CKEditor instance. Having this, the developer may use the full API of CKEditor.

### `placeholderClass`

String

Defined in `src/ui/react/src/adapter/alloy-editor.js:239`

Specifies the class, which should be added by Placeholder plugin {{#crossLink "CKEDITOR.plugins.ae_placeholder}}{{/crossLink}} when editor is not focused.

Default: 'ae-placeholder'

### `removePlugins`

String

Defined in `src/ui/react/src/adapter/alloy-editor.js:255`

Specifies the plugins, which come by default with CKEditor, but which are not needed by AlloyEditor. These plugins add the default UI for CKeditor, which is no more needed. Please note that AlloyEdtor comes with its own highly optimized copy of CKEditor (just customized via their official download page). This version does not come with the unneeded plugins, so the value of this property won't be needed. However, if you decide to go with the OOTB version of CKEditor, you will have to remove some of the plugins if you decide to use AlloyEditor. Keep in mind that removing these plugins doesn't remove them entirely from CKEditor. It just removes them from its current instance, in which you will use different UI - those of AlloyEditor. You will be fully able to use both OOTB CKEditor and AlloyEditor on the same page!

Default: 'contextmenu,toolbar,elementspath,resize,liststyle,link'

### `srcNode`

String | Node

Defined in `src/ui/react/src/adapter/alloy-editor.js:277`

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

### `toolbars`

Object

Defined in `src/ui/react/src/adapter/alloy-editor.js:289`

The toolbars configuration for this editor instance

### `uiNode`

String | Node

Defined in `src/ui/react/src/adapter/alloy-editor.js:308`

The Node ID or HTMl node, where AlloyEditor's UI should be rendered.