Class: ControllerView

Drupal.ckeditor.ControllerView()

new ControllerView()

Backbone View acting as a controller for CKEditor toolbar configuration.

Source:

Extends

  • Backbone.View

Members

events :object

Type:
  • object
Source:

Methods

broadcastConfigurationChanges($ckeditorToolbar)

Sets up broadcasting of CKEditor toolbar configuration changes.

Parameters:
Name Type Description
$ckeditorToolbar jQuery

The active toolbar DOM element wrapped in jQuery.

Source:

disableFeaturesDisallowedByFilters(features, buttonsToFeatures)

Checks buttons against filter settings; disables disallowed buttons.

Parameters:
Name Type Description
features object

A map of Drupal.EditorFeature objects.

buttonsToFeatures object

Object containing the button-to-feature mapping.

Source:
See:

getButtonList(config) → {Array}

Returns the list of buttons from an editor configuration.

Parameters:
Name Type Description
config object

A CKEditor configuration object.

Source:
Returns:

A list of buttons in the CKEditor configuration.

Type
Array

getCKEditorFeatures(CKEditorConfig, callback)

Asynchronously retrieve the metadata for all available CKEditor features.

In order to get a list of all features needed by CKEditor, we create a hidden CKEditor instance, then check the CKEditor's "allowedContent" filter settings. Because creating an instance is expensive, a callback must be provided that will receive a hash of Drupal.EditorFeature features keyed by feature (button) name.

Parameters:
Name Type Description
CKEditorConfig object

An object that represents the configuration settings for a CKEditor editor component.

callback function

A function to invoke when the instanceReady event is fired by the CKEditor object.

Source:

getFeatureForButton(button) → {object}

Retrieves the feature for a given button from featuresMetadata. Returns false if the given button is in fact a divider.

Parameters:
Name Type Description
button string

The name of a CKEditor button.

Source:
Returns:

The feature metadata object for a button.

Type
object

parseEditorDOM(model, isDirty, options)

Converts the active toolbar DOM structure to an object representation.

Parameters:
Name Type Description
model Drupal.ckeditor.ConfigurationModel

The state model for the CKEditor configuration.

isDirty bool

Tracks whether the active toolbar DOM structure has been changed. isDirty is toggled back to false in this method.

options object

An object that includes:

Properties
Name Type Attributes Description
broadcast bool <optional>

A flag that controls whether a CKEditorToolbarChanged event should be fired for configuration changes.

Source:
Fires:
  • event:CKEditorToolbarChanged