3 * A Backbone Model for the state of a CKEditor toolbar configuration .
6 (function (Drupal, Backbone) {
8 * Backbone model for the CKEditor toolbar configuration state.
12 * @augments Backbone.Model
14 Drupal.ckeditor.Model = Backbone.Model.extend(/** @lends Drupal.ckeditor.Model# */{
21 defaults: /** @lends Drupal.ckeditor.Model# */{
24 * The CKEditor configuration that is being manipulated through the UI.
26 activeEditorConfig: null,
29 * The textarea that contains the serialized representation of the active
30 * CKEditor configuration.
35 * Tracks whether the active toolbar DOM structure has been changed. When
36 * true, activeEditorConfig needs to be updated, and when that is updated,
37 * $textarea will also be updated.
42 * The configuration for the hidden CKEditor instance that is used to
43 * build the features metadata.
45 hiddenEditorConfig: null,
48 * A hash that maps buttons to features.
50 buttonsToFeatures: null,
53 * A hash, keyed by a feature name, that details CKEditor plugin features.
55 featuresMetadata: null,
58 * Whether the button group names are currently visible.
60 groupNamesVisible: false,
67 // Push the settings into the textarea.
68 this.get('$textarea').val(JSON.stringify(this.get('activeEditorConfig')));