Show: Inherited Protected Private Deprecated

# ButtonStylesListItem Class

Uses:

- ButtonActionStyle
- ButtonStyle

Defined in: `src/ui/react/src/components/buttons/button-styles-list-item.jsx:4`

The ButtonStylesListItem class provides functionality for previewing a style definition inside a list and applying it to the current editor selection.

## Index

### Methods

- _onClick
- applyStyle
- componentWillMount
- componentWillUnmount
- getStyle
- isActive
- render

### Properties

- key static
- style

## Methods

### `_onClick`

() protected

Defined in `src/ui/react/src/components/buttons/button-styles-list-item.jsx:64`

Applies the item style to the editor selection.

### `applyStyle`

()

Inherited from ButtonActionStyle: `src/ui/react/src/components/base/button-action-style.js:16`

Removes or applies the component style to the current selection.

### `componentWillMount`

()

Inherited from ButtonStyle but overwritten in `src/ui/react/src/components/buttons/button-styles-list-item.jsx:28`

Lifecycle. Invoked once, both on the client and server, immediately before the initial rendering occurs.

### `componentWillUnmount`

()

Inherited from ButtonStyle: `src/ui/react/src/components/base/button-style.js:55`

Lifecycle. Invoked immediately before a component is unmounted from the DOM.

### `getStyle`

() CKEDITOR.style

Inherited from ButtonStyle: `src/ui/react/src/components/base/button-style.js:64`

Returns instance of CKEDITOR.style which represents the current button style.

#### Returns:

CKEDITOR.style:

The current style representation.

### `isActive`

() Boolean

Inherited from ButtonStyle: `src/ui/react/src/components/base/button-style.js:74`

Checks if style is active in the current selection.

#### Returns:

Boolean:

True if style is active, false otherwise.

### `render`

() Object

Defined in `src/ui/react/src/components/buttons/button-styles-list-item.jsx:48`

Lifecycle. Renders the UI of the button.

#### Returns:

Object:

The content which should be rendered.

## Properties

### `key`

String static

Defined in `src/ui/react/src/components/buttons/button-styles-list-item.jsx:18`

The name which will be used as an alias of the button in the configuration.

Default: buttonStylesListItem

### `style`

Object | String

Inherited from ButtonStyle: `src/ui/react/src/components/base/button-style.js:13`

The style the button should handle. Allowed values are:

- Object as described by http://docs.ckeditor.com/#!/api/CKEDITOR.style.
- String pointing to an object inside the editor instance configuration. For example, `style = 'coreStyles_bold'` will try to retrieve the style object from `editor.config.coreStyles_bold`. Nested properties such as `style = 'myplugin.myConfig.myStyle'` are also supported and will try to retrieve the style object from the editor configuration as well.