new ControllerView()
Backbone View acting as a controller for CKEditor toolbar configuration.
Extends
- Backbone.View
Members
events :object
Type:
- object
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. |
disableFeaturesDisallowedByFilters(features, buttonsToFeatures)
Checks buttons against filter settings; disables disallowed buttons.
Parameters:
Name | Type | Description |
---|---|---|
features |
object | A map of |
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. |
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. |
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. |
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
|
Fires:
- event:CKEditorToolbarChanged