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(
15 /** @lends Drupal.ckeditor.Model# */ {
21 defaults: /** @lends Drupal.ckeditor.Model# */ {
23 * The CKEditor configuration that is being manipulated through the UI.
25 activeEditorConfig: null,
28 * The textarea that contains the serialized representation of the active
29 * CKEditor configuration.
34 * Tracks whether the active toolbar DOM structure has been changed. When
35 * true, activeEditorConfig needs to be updated, and when that is updated,
36 * $textarea will also be updated.
41 * The configuration for the hidden CKEditor instance that is used to
42 * build the features metadata.
44 hiddenEditorConfig: null,
47 * A hash that maps buttons to features.
49 buttonsToFeatures: null,
52 * A hash, keyed by a feature name, that details CKEditor plugin features.
54 featuresMetadata: null,
57 * Whether the button group names are currently visible.
59 groupNamesVisible: false,
66 // Push the settings into the textarea.
67 this.get('$textarea').val(
68 JSON.stringify(this.get('activeEditorConfig')),