new VisualView()
Backbone View for CKEditor toolbar configuration; visual UX.
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.
endButtonDrag(event)
Handles Sortable stop sort of a button.
Parameters:
Name | Type | Description |
---|---|---|
event |
CustomEvent | The event triggered on the button drag. |
endGroupDrag(event)
Handles Sortable stop sort of a button group.
Parameters:
Name | Type | Description |
---|---|---|
event |
CustomEvent | The event triggered on the group drag. |
insertNewGroupButtons()
Inserts a button in each row that will add a new CKEditor button group.
insertPlaceholderRow()
Inserts a blank row at the bottom of the CKEditor configuration.
insertPlaceholders()
Wraps the invocation of methods to insert blank groups and rows.
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. |
onGroupNameClick(event)
Handles clicks to a button group name.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The click event on the button group. |
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. |
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. |
Returns:
The Drupal.ckeditor.VisualView
object.
startButtonDrag(event)
Handles Sortable start sort of a button.
Parameters:
Name | Type | Description |
---|---|---|
event |
CustomEvent | The event triggered on the button drag. |