Show: Inherited Protected Private Deprecated

# ButtonUnderline Class

Uses:

- ButtonCommand
- ButtonKeystroke
- ButtonStateClasses
- ButtonStyle

Defined in: `src/ui/react/src/components/buttons/button-underline.jsx:4`

The ButtonUnderline class provides functionality for underlying a text selection.

## Index

### Methods

- componentWillMount
- componentWillUnmount
- execCommand
- getDefaultProps
- getStateClasses
- getStyle
- isActive
- render

### Properties

- command
- editor
- key static
- keystroke
- label
- modifiesSelection
- style
- tabIndex

## Methods

### `componentWillMount`

()

Inherited from ButtonStyle but overwritten in `src/ui/react/src/components/base/button-keystroke.js:24`

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

### `componentWillUnmount`

()

Inherited from ButtonStyle but overwritten in `src/ui/react/src/components/base/button-keystroke.js:59`

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

### `execCommand`

(

- `data`

)

Inherited from ButtonCommand: `src/ui/react/src/components/base/button-command.js:27`

Executes a CKEditor command and fires `actionPerformed` event.

#### Parameters:

- `data` Object=

  Optional data to be passed to CKEDITOR's `execCommand` method.

### `getDefaultProps`

() Object

Defined in `src/ui/react/src/components/buttons/button-underline.jsx:54`

Lifecycle. Returns the default values of the properties used in the widget.

#### Returns:

Object:

The default properties.

### `getStateClasses`

() String

Inherited from ButtonStateClasses: `src/ui/react/src/components/base/button-state-classes.js:15`

Returns the list of state classes associated to the current element's state, according to the results of the isActive and isDisabled methods.

#### Returns:

String:

A string with the state CSS classes.

### `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-underline.jsx:71`

Lifecycle. Renders the UI of the button.

#### Returns:

Object:

The content which should be rendered.

## Properties

### `command`

String

Inherited from ButtonCommand: `src/ui/react/src/components/base/button-command.js:12`

The command that should be executed.

### `editor`

Object

Defined in `src/ui/react/src/components/buttons/button-underline.jsx:19`

The editor instance where the component is being used.

### `key`

String static

Defined in `src/ui/react/src/components/buttons/button-underline.jsx:44`

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

Default: underline

### `keystroke`

Object

Inherited from ButtonKeystroke: `src/ui/react/src/components/base/button-keystroke.js:13`

The keystroke definition. An object with the following properties:

- fn: The function to be executed
- keys: The keystroke definition, as expected by http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setKeystroke
- name: The name for the CKEditor command that will be created. If empty, a random name will be created on the fly

### `label`

String

Defined in `src/ui/react/src/components/buttons/button-underline.jsx:26`

The label that should be used for accessibility purposes.

### `modifiesSelection`

Boolean

Inherited from ButtonCommand: `src/ui/react/src/components/base/button-command.js:19`

Indicates that the command may cause the editor to have a different.

### `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.

### `tabIndex`

Number

Defined in `src/ui/react/src/components/buttons/button-underline.jsx:33`

The tabIndex of the button in its toolbar current state. A value other than -1 means that the button has focus and is the active element.