Class: editor

Drupal.quickedit.editors.editor(options)

new editor(options)

Parameters:
Name Type Description
options object

Options for the editor view.

Source:

Extends

Members

$textElement :jQuery

Stores the textual DOM element that is being in-place edited.

Type:
Source:

textEditor :Drupal.quickedit.EditorModel

Stores a reference to the text editor object for this field.

Type:
Source:

textFormat :string

The text format for this field.

Type:
  • string
Source:

textFormatHasTransformations :bool

Indicates whether this text format has transformations.

Type:
  • bool
Source:

Methods

_getUntransformedText(callback)

Loads untransformed text for this field.

More accurately: it re-filters formatted text to exclude transformation filters used by the text format.

Parameters:
Name Type Description
callback function

A callback function that will receive the untransformed text.

Source:
See:
  • \Drupal\editor\Ajax\GetUntransformedTextCommand

getEditedElement() → {jQuery}

{@inheritdoc}

Overrides:
Source:
Returns:

The text element edited.

Type
jQuery

getQuickEditUISettings() → {object}

{@inheritdoc}

Overrides:
Source:
Returns:

The settings for the quick edit UI.

Type
object

remove()

{@inheritdoc}

Inherited From:
Source:

removeValidationErrors()

Cleans up validation error messages.

Should be called when the state is changed to 'candidate' or 'saving'. In the case of the latter: the user has modified the value in the in-place editor again to attempt to save again. In the case of the latter: the invalid value was discarded.

Inherited From:
Source:

revert()

{@inheritdoc}

Overrides:
Source:

save()

Saves the modified value in the in-place editor for this field.

Inherited From:
Source:

showValidationErrors()

Shows validation error messages.

Should be called when the state is changed to 'invalid'.

Inherited From:
Source:

stateChange(fieldModel, state)

{@inheritdoc}

Parameters:
Name Type Description
fieldModel object

The field model.

state string

The current state.

Overrides:
Source: