Class: VisualView

Drupal.ckeditor.VisualView()

new VisualView()

Backbone View for CKEditor toolbar configuration; visual UX.

Source:

Extends

  • Backbone.View

Methods

applySorting()

Invokes Sortable() on new buttons and groups in a CKEditor config. Array.prototype.forEach is used here because of the lack of support for NodeList.forEach in older browsers.

Source:

endButtonDrag(event)

Handles Sortable stop sort of a button.

Parameters:
Name Type Description
event CustomEvent

The event triggered on the button drag.

Source:

endGroupDrag(event)

Handles Sortable stop sort of a button group.

Parameters:
Name Type Description
event CustomEvent

The event triggered on the group drag.

Source:

insertNewGroupButtons()

Inserts a button in each row that will add a new CKEditor button group.

Source:

insertPlaceholderRow()

Inserts a blank row at the bottom of the CKEditor configuration.

Source:

insertPlaceholders()

Wraps the invocation of methods to insert blank groups and rows.

Source:

onAddGroupButtonClick(event)

Prompts the user to provide a name for a new button group; inserts it.

Parameters:
Name Type Description
event jQuery.Event

The event of the button click.

Source:

onGroupNameClick(event)

Handles clicks to a button group name.

Parameters:
Name Type Description
event jQuery.Event

The click event on the button group.

Source:

onGroupNamesToggleClick(event)

Handles clicks on the button group names toggle button.

Parameters:
Name Type Description
event jQuery.Event

The click event on the toggle button.

Source:

render(model, valueopt, changedAttributes) → {Drupal.ckeditor.VisualView}

Render function for rendering the toolbar configuration.

Parameters:
Name Type Attributes Description
model *

Model used for the view.

value string <optional>

The value that was changed.

changedAttributes object

The attributes that was changed.

Source:
Returns:
Type
Drupal.ckeditor.VisualView

startButtonDrag(event)

Handles Sortable start sort of a button.

Parameters:
Name Type Description
event CustomEvent

The event triggered on the button drag.

Source: