3 * AJAX commands used by Editor module.
6 (function ($, Drupal) {
11 * Command to save the contents of an editor-provided modal.
13 * This command does not close the open modal. It should be followed by a
14 * call to `Drupal.AjaxCommands.prototype.closeDialog`. Editors that are
15 * integrated with dialogs must independently listen for an
16 * `editor:dialogsave` event to save the changes into the contents of their
19 * @param {Drupal.Ajax} [ajax]
20 * The Drupal.Ajax object.
21 * @param {object} response
22 * The server response from the ajax request.
23 * @param {Array} response.values
24 * The values that were saved.
25 * @param {number} [status]
26 * The status code from the ajax request.
28 * @fires event:editor:dialogsave
30 Drupal.AjaxCommands.prototype.editorDialogSave = function (ajax, response, status) {
31 $(window).trigger('editor:dialogsave', [response.values]);