Show:

The ButtonTableEdit class provides functionality for creating and editing a table in a document. Provides UI for creating a table.

Methods

_createTable

() protected

Creates a table.

_handleChange

(
  • inputName
  • event
)
protected

Handles a change in input value. Sets the provided value from the user back to the input.

Parameters:

  • inputName String

    The name of the input which value should be updated.

  • event SyntheticEvent

    The provided event.

_handleKeyDown

(
  • event
)
protected

Monitors key interaction inside the input element to respond to the keys:

  • Enter: Creates the table.
  • Escape: Discards the changes.

Parameters:

  • event SyntheticEvent

    The keyboard event.

componentDidMount

()

Lifecycle. Invoked once, only on the client (not on the server), immediately after the initial rendering occurs.

Focuses on the link input to immediately allow editing.

getDefaultProps

()

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

getInitialState

()

Lifecycle. Invoked once before the component is mounted.

render

() Object

Lifecycle. Renders the UI of the button.

Returns:

Object:

The content which should be rendered.

Properties

cancelExclusive

Function

Method to notify the button abandons the exclusive rendering mode.

editor

Object

The editor instance where the component is being used.

key

String static

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

Default: tableEdit