core/misc/dialog.ajax.js | 4 +- core/misc/dialog.js | 4 +- core/modules/ckeditor/css/ckeditor.css | 6 +++ core/modules/ckeditor/js/ckeditor.js | 55 ++++++++++---------- .../ckeditor/js/plugins/drupalimage/plugin.js | 31 ++++++----- .../ckeditor/js/plugins/drupallink/link.png | 2 +- .../ckeditor/js/plugins/drupallink/plugin.js | 36 ++++++------- .../lib/Drupal/ckeditor/CKEditorPluginBase.php | 6 +-- .../ckeditor/Plugin/CKEditorPlugin/DrupalImage.php | 8 +-- .../ckeditor/Plugin/CKEditorPlugin/DrupalLink.php | 15 +++--- .../ckeditor/Plugin/CKEditorPlugin/Internal.php | 5 -- .../lib/Drupal/ckeditor/Tests/CKEditorTest.php | 2 - core/modules/editor/js/editor.dialog.js | 2 +- .../lib/Drupal/editor/Ajax/EditorDialogSave.php | 5 +- .../lib/Drupal/editor/Form/EditorImageDialog.php | 4 +- .../lib/Drupal/editor/Form/EditorLinkDialog.php | 4 +- 16 files changed, 96 insertions(+), 93 deletions(-) diff --git a/core/misc/dialog.ajax.js b/core/misc/dialog.ajax.js index 40786c7..5758b40 100644 --- a/core/misc/dialog.ajax.js +++ b/core/misc/dialog.ajax.js @@ -36,7 +36,7 @@ * @return * An array of buttons that need to be added to the button area. */ - prepareDialogButtons: function($dialog) { + prepareDialogButtons: function ($dialog) { var buttons = []; var $buttons = $dialog.find('.form-actions input[type=submit], button'); $buttons.each(function () { @@ -51,7 +51,7 @@ }); }); if ($buttons.length) { - $dialog.find('form').on('submit.dialogSubmit', function(e) { + $dialog.find('form').on('submit.dialogSubmit', function (e) { $buttons.first().trigger('mousedown'); e.preventDefault(); }); diff --git a/core/misc/dialog.js b/core/misc/dialog.js index b94aed4..2d186e2 100644 --- a/core/misc/dialog.js +++ b/core/misc/dialog.js @@ -23,7 +23,7 @@ Drupal.dialog = function (element, options) { // Trigger a global event to allow scripts to bind events to the dialog. $(window).trigger('dialog:beforecreate', [dialog, $element, settings]); $element.dialog(settings); - if (settings['autoResize'] !== 'false' && settings['autoResize'] !== false) { + if (settings.autoResize !== 'false' && settings.autoResize !== false) { $(window).on('resize.dialogResize scroll.dialogResize', autoResize); resetPosition(); } @@ -58,7 +58,7 @@ Drupal.dialog = function (element, options) { optionValue = adjustedOptions[positionOptions[n]]; // jQuery UI does not support percentages on heights, convert to pixels. if (positionOptions[n].match(/height/i) && typeof optionValue === 'string' && optionValue.match(/%$/)) { - adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight); + adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10); // Don't force the dialog to be bigger vertically than needed. if (positionOptions[n] === 'height' && $element.parent().outerHeight() < adjustedValue) { adjustedValue = 'auto'; diff --git a/core/modules/ckeditor/css/ckeditor.css b/core/modules/ckeditor/css/ckeditor.css index 08d5716..f45ec26 100644 --- a/core/modules/ckeditor/css/ckeditor.css +++ b/core/modules/ckeditor/css/ckeditor.css @@ -16,4 +16,10 @@ font-size: 14px; position: relative; top: 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js index 93c4860..3e0866b 100644 --- a/core/modules/ckeditor/js/ckeditor.js +++ b/core/modules/ckeditor/js/ckeditor.js @@ -116,14 +116,14 @@ Drupal.ckeditor = { * * @param editor * The CKEditor instance that is opening the dialog. - * @param url + * @param string url * The URL that contains the contents of the dialog. - * @param existingValues + * @param Object existingValues * Existing values that will be sent via POST to the url for the dialog * contents. - * @param saveCallback + * @param Function saveCallback * A function to be called upon saving the dialog. - * @param dialogSettings + * @param Object dialogSettings * An object containing settings to be passed to the jQuery UI. */ openDialog: function (editor, url, existingValues, saveCallback, dialogSettings) { @@ -137,35 +137,34 @@ Drupal.ckeditor = { $target.css('position', 'relative').find('.ckeditor-dialog-loading').remove(); // Add a consistent dialog class. - var classes = dialogSettings['dialogClass'] ? dialogSettings['dialogClass'].split(' ') : []; + var classes = dialogSettings.dialogClass ? dialogSettings.dialogClass.split(' ') : []; classes.push('editor-dialog'); - dialogSettings['dialogClass'] = classes.join(' '); - dialogSettings['maxHeight'] = '95%'; - dialogSettings['resizable'] = false; - dialogSettings['autoResize'] = $(window).width() > 600; - - // Generate a pseudo-AJAX object for ajax.js to use in making this request. - Drupal.settings.ajax = Drupal.settings.ajax || {}; - Drupal.settings.ajax['ckeditor-dialog'] = { + dialogSettings.dialogClass = classes.join(' '); + dialogSettings.maxHeight = '95%'; + dialogSettings.resizable = false; + dialogSettings.autoResize = $(window).width() > 600; + + // Add a "Loading…" message, hide it underneath the CKEditor toolbar, create + // a Drupal.ajax instance to load the dialog and trigger it. + var $content = $('
'); + $content.appendTo($target); + new Drupal.ajax('ckeditor-dialog', $content.find('a').get(0), { accepts: 'application/vnd.drupal-modal', dialog: dialogSettings, - selector: '.ckeditor-dialog-loading-link a', + selector: '.ckeditor-dialog-loading-link', url: url, - event: 'click', + event: 'ckeditor-internal.ckeditor', progress: { 'type': 'throbber' }, submit: { editor_object: existingValues } - }; - - // Add a new AJAX link, click it, then display it while loading. - var $content = $(''); - $content.appendTo($target); - Drupal.attachBehaviors($content[0]); - $content.find('a').trigger('click'); + }); + $content.find('a') + .on('click', function () { return false; }) + .trigger('ckeditor-internal.ckeditor'); - // After a short delay, show the loading throbber. - window.setTimeout(function() { + // After a short delay, show "Loading…" message. + window.setTimeout(function () { $content.find('span').animate({ top: '0px' }); }, 1000); @@ -175,21 +174,21 @@ Drupal.ckeditor = { }; // Respond to new dialogs that are opened by CKEditor, closing the AJAX loader. -$(window).on('dialog:beforecreate', function(e, dialog, $element, settings) { - $('.ckeditor-dialog-loading').animate({ top: '-40px' }, function() { +$(window).on('dialog:beforecreate', function (e, dialog, $element, settings) { + $('.ckeditor-dialog-loading').animate({ top: '-40px' }, function () { $(this).remove(); }); }); // Respond to dialogs that are saved, sending data back to CKEditor. -$(window).on('editor:dialogsave', function(e, values) { +$(window).on('editor:dialogsave', function (e, values) { if (Drupal.ckeditor.saveCallback) { Drupal.ckeditor.saveCallback(values); } }); // Respond to dialogs that are closed, removing the current save handler. -$(window).on('dialog:afterclose', function(e, dialog, $element) { +$(window).on('dialog:afterclose', function (e, dialog, $element) { if (Drupal.ckeditor.saveCallback) { Drupal.ckeditor.saveCallback = null; } diff --git a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js index 034a560..23efdea 100644 --- a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js +++ b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js @@ -13,6 +13,8 @@ CKEDITOR.plugins.add('drupalimage', { editor.addCommand('image', { allowedContent: 'img[alt,src,width,height,class,id,lang,longdesc,title]', requiredContent: 'img[alt,src,width,height]', + modes: { wysiwyg : 1 }, + canUndo: true, exec: function (editor) { var imageElement = getSelectedImage(editor); var imageDOMElement = null; @@ -31,27 +33,27 @@ CKEDITOR.plugins.add('drupalimage', { } } - var saveCallback = function(returnValues) { + function saveCallback (returnValues) { // Save snapshot for undo support. editor.fire('saveSnapshot'); // Create a new image element if needed. - if (!imageElement && returnValues['attributes']['src']) { + if (!imageElement && returnValues.attributes.src) { imageElement = editor.document.createElement('img'); imageElement.setAttribute('alt', ''); editor.insertElement(imageElement); } // Delete the image if the src was removed. - if (imageElement && !returnValues['attributes']['src']) { + if (imageElement && !returnValues.attributes.src) { imageElement.remove(); } // Update the image properties. else { - for (var key in returnValues['attributes']) { - if (returnValues['attributes'].hasOwnProperty(key)) { + for (var key in returnValues.attributes) { + if (returnValues.attributes.hasOwnProperty(key)) { // Update the property if a value is specified. - if (returnValues['attributes'][key].length > 0) { - imageElement.setAttribute(key, returnValues['attributes'][key]); + if (returnValues.attributes[key].length > 0) { + imageElement.setAttribute(key, returnValues.attributes[key]); } // Delete the property if set to an empty string. else { @@ -60,18 +62,19 @@ CKEDITOR.plugins.add('drupalimage', { } } } - }; + } + // Drupal.t() will not work inside CKEditor plugins because CKEditor - // loads the JS file instead of Drupal. Pull translated strings from - // the plugin settings that are translated server-side. + // loads the JavaScript file instead of Drupal. Pull translated strings + // from the plugin settings that are translated server-side. var dialogSettings = { title: imageDOMElement ? editor.config.drupalImage_dialogTitleEdit : editor.config.drupalImage_dialogTitleAdd, dialogClass: 'editor-image-dialog' }; + + // Open the dialog for the edit form. Drupal.ckeditor.openDialog(editor, editor.config.drupalImage_dialogUrl, existingValues, saveCallback, dialogSettings); - }, - modes: { wysiwyg : 1 }, - canUndo: true + } }); // Register the toolbar button. @@ -84,7 +87,7 @@ CKEDITOR.plugins.add('drupalimage', { } // Double clicking an image opens its properties. - editor.on('doubleclick', function(event) { + editor.on('doubleclick', function (event) { var element = event.data.element; if (element.is('img') && !element.data('cke-realelement') && !element.isReadOnly()) { editor.getCommand('image').exec(); diff --git a/core/modules/ckeditor/js/plugins/drupallink/link.png b/core/modules/ckeditor/js/plugins/drupallink/link.png index c44f93a..54e506a 100644 --- a/core/modules/ckeditor/js/plugins/drupallink/link.png +++ b/core/modules/ckeditor/js/plugins/drupallink/link.png @@ -1,3 +1,3 @@ PNG - IHDR (-S lPLTE XXX]]]PPPPPP #tRNS 68abcdg jIDAT @ UqәфcCvE-3E 57] ]7bC-ٞ}}o; Iu-irV!!/2$I@ IENDB` \ No newline at end of file + IHDR (-S lPLTE XXX]]]PPPPPP #tRNS 68abcdg hIDATxڭG0 {ZdD kWi ILi2uԱ*]x y2lބ{m6Ǫ:`ᘦR 2$:WYz IENDB` \ No newline at end of file diff --git a/core/modules/ckeditor/js/plugins/drupallink/plugin.js b/core/modules/ckeditor/js/plugins/drupallink/plugin.js index cc35233..6d3c543 100644 --- a/core/modules/ckeditor/js/plugins/drupallink/plugin.js +++ b/core/modules/ckeditor/js/plugins/drupallink/plugin.js @@ -15,7 +15,7 @@ CKEDITOR.plugins.add('drupallink', { requiredContent: 'a[href]', modes: { wysiwyg : 1 }, canUndo: true, - exec: function(editor) { + exec: function (editor) { var linkElement = getSelectedLink(editor); var linkDOMElement = null; @@ -33,25 +33,25 @@ CKEDITOR.plugins.add('drupallink', { } // Prepare a save callback to be used upon saving the dialog. - var saveCallback = function(returnValues) { + var saveCallback = function (returnValues) { // Save snapshot for undo support. editor.fire('saveSnapshot'); // Create a new link element if needed. - if (!linkElement && returnValues['attributes']['href']) { + if (!linkElement && returnValues.attributes.href) { var selection = editor.getSelection(); var range = selection.getRanges(1)[0]; // Use link URL as text with a collapsed cursor. if (range.collapsed) { // Shorten mailto URLs to just the e-mail address. - var text = new CKEDITOR.dom.text(returnValues['attributes']['href'].replace(/^mailto:/, ''), editor.document); + var text = new CKEDITOR.dom.text(returnValues.attributes.href.replace(/^mailto:/, ''), editor.document); range.insertNode(text); range.selectNodeContents(text); } // Create the new link by applying a style to the new text. - var style = new CKEDITOR.style({ element: 'a', attributes: returnValues['attributes'] }); + var style = new CKEDITOR.style({ element: 'a', attributes: returnValues.attributes }); style.type = CKEDITOR.STYLE_INLINE; style.applyToRange(range); range.select(); @@ -61,11 +61,11 @@ CKEDITOR.plugins.add('drupallink', { } // Update the link properties. else if (linkElement) { - for (var key in returnValues['attributes']) { - if (returnValues['attributes'].hasOwnProperty(key)) { + for (var key in returnValues.attributes) { + if (returnValues.attributes.hasOwnProperty(key)) { // Update the property if a value is specified. - if (returnValues['attributes'][key].length > 0) { - linkElement.setAttribute(key, returnValues['attributes'][key]); + if (returnValues.attributes[key].length > 0) { + linkElement.setAttribute(key, returnValues.attributes[key]); } // Delete the property if set to an empty string. else { @@ -76,14 +76,14 @@ CKEDITOR.plugins.add('drupallink', { } }; // Drupal.t() will not work inside CKEditor plugins because CKEditor - // loads the JS file instead of Drupal. Pull translated strings from - // the plugin settings that are translated server-side. + // loads the JavaScript file instead of Drupal. Pull translated strings + // from the plugin settings that are translated server-side. var dialogSettings = { title: linkElement ? editor.config.drupalLink_dialogTitleEdit : editor.config.drupalLink_dialogTitleAdd, dialogClass: 'editor-link-dialog' }; - // Open the dialog to edit form. + // Open the dialog for the edit form. Drupal.ckeditor.openDialog(editor, editor.config.drupalLink_dialogUrl, existingValues, saveCallback, dialogSettings); } }); @@ -91,13 +91,13 @@ CKEDITOR.plugins.add('drupallink', { contextSensitive: 1, startDisabled: 1, requiredContent: 'a[href]', - exec: function(editor) { + exec: function (editor) { var style = new CKEDITOR.style({ element:'a', type: CKEDITOR.STYLE_INLINE, alwaysRemoveElement: 1 }); editor.removeStyle(style); }, - refresh: function( editor, path ) { + refresh: function ( editor, path ) { var element = path.lastElement && path.lastElement.getAscendant('a', true); - if (element && element.getName() == 'a' && element.getAttribute('href') && element.getChildCount()) { + if (element && element.getName() === 'a' && element.getAttribute('href') && element.getChildCount()) { this.setState(CKEDITOR.TRISTATE_OFF); } else { @@ -106,7 +106,7 @@ CKEDITOR.plugins.add('drupallink', { } }); - editor.setKeystroke(CKEDITOR.CTRL + 76 /*L*/, 'link'); + editor.setKeystroke(CKEDITOR.CTRL + 75 /*K*/, 'link'); // Add buttons for link and unlink. if (editor.ui.addButton) { @@ -122,7 +122,7 @@ CKEDITOR.plugins.add('drupallink', { }); } - editor.on('doubleclick', function(evt) { + editor.on('doubleclick', function (evt) { var element = getSelectedLink(editor) || evt.data.element; if (!element.isReadOnly()) { @@ -154,7 +154,7 @@ CKEDITOR.plugins.add('drupallink', { // If the "contextmenu" plugin is loaded, register the listeners. if (editor.contextMenu) { - editor.contextMenu.addListener(function(element, selection) { + editor.contextMenu.addListener(function (element, selection) { if (!element || element.isReadOnly()) { return null; } diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginBase.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginBase.php index 445d9c4..34ab0bd 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginBase.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginBase.php @@ -33,21 +33,21 @@ abstract class CKEditorPluginBase extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface { /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal(). + * {@inheritdoc} */ function isInternal() { return FALSE; } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getDependencies(). + * {@inheritdoc} */ function getDependencies(Editor $editor) { return array(); } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getLibraries(). + * {@inheritdoc} */ function getLibraries(Editor $editor) { return array(); diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImage.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImage.php index 37204f8..77d6b75 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImage.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalImage.php @@ -24,14 +24,14 @@ class DrupalImage extends CKEditorPluginBase { /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile(). + * {@inheritdoc} */ public function getFile() { return drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/plugin.js'; } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getLibraries(). + * {@inheritdoc} */ public function getLibraries(Editor $editor) { return array( @@ -40,7 +40,7 @@ public function getLibraries(Editor $editor) { } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getConfig(). + * {@inheritdoc} */ public function getConfig(Editor $editor) { return array( @@ -51,7 +51,7 @@ public function getConfig(Editor $editor) { } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons(). + * {@inheritdoc} */ public function getButtons() { return array( diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalLink.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalLink.php index 69e88ff..5e08e32 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalLink.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/DrupalLink.php @@ -24,14 +24,14 @@ class DrupalLink extends CKEditorPluginBase { /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile(). + * {@inheritdoc} */ public function getFile() { return drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/plugin.js'; } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getLibraries(). + * {@inheritdoc} */ public function getLibraries(Editor $editor) { return array( @@ -40,7 +40,7 @@ public function getLibraries(Editor $editor) { } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getConfig(). + * {@inheritdoc} */ public function getConfig(Editor $editor) { return array( @@ -51,17 +51,18 @@ public function getConfig(Editor $editor) { } /** - * Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons(). + * {@inheritdoc} */ public function getButtons() { + $path = drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink'; return array( 'DrupalLink' => array( 'label' => t('Link'), - 'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/link.png', + 'image' => $path . '/link.png', ), 'DrupalUnlink' => array( - 'label' => t('unink'), - 'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/unlink.png', + 'label' => t('Unlink'), + 'image' => $path . '/unlink.png', ), ); } diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php index 8fd3591..c2f5622 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php @@ -47,11 +47,6 @@ public function getConfig(Editor $editor) { 'customConfig' => '', // Don't load CKEditor's config.js file. 'pasteFromWordPromptCleanup' => TRUE, 'resize_dir' => 'vertical', - 'keystrokes' => array( - // 0x11000 is CKEDITOR.CTRL, see http://docs.ckeditor.com/#!/api/CKEDITOR-property-CTRL. - array(0x110000 + 75, 'link'), - array(0x110000 + 76, NULL), - ), ); // Next, add the format_tags setting, if its button is enabled. diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php index be9c74a..0f532a0 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php @@ -103,7 +103,6 @@ function testGetJSSettings() { $expected_config['drupalExternalPlugins']['llama_contextual'] = file_create_url('core/modules/ckeditor/tests/modules/js/llama_contextual.js'); $expected_config['drupalExternalPlugins']['llama_contextual_and_button'] = file_create_url('core/modules/ckeditor/tests/modules/js/llama_contextual_and_button.js'); $expected_config['contentsCss'][] = file_create_url('core/modules/ckeditor/tests/modules/ckeditor_test.css'); - $expected_config['keystrokes'] = array(array(1114187, 'link'), array(1114188, NULL)); $this->assertEqual($expected_config, $this->ckeditor->getJSSettings($editor), 'Generated JS settings are correct for customized configuration.'); // Change the allowed HTML tags; the "format_tags" setting for CKEditor @@ -233,7 +232,6 @@ protected function getDefaultInternalConfig() { 'customConfig' => '', 'pasteFromWordPromptCleanup' => TRUE, 'resize_dir' => 'vertical', - 'keystrokes' => array(array(0x110000 + 75, 'link'), array(0x110000 + 76, NULL)), ); } diff --git a/core/modules/editor/js/editor.dialog.js b/core/modules/editor/js/editor.dialog.js index 5ce3a69..35dd4be 100644 --- a/core/modules/editor/js/editor.dialog.js +++ b/core/modules/editor/js/editor.dialog.js @@ -10,7 +10,7 @@ * Command to save the contents of an editor-provided modal. * * This command does not close the open modal. It should be followed by a call - * to Drupal.ajax.prototype.commands.closeDialog. Editors that are integrated + * to Drupal.AjaxCommands.prototype.closeDialog. Editors that are integrated * with dialogs must independently listen for an editor:dialogsave event to save * the changes into the contents of their interface. */ diff --git a/core/modules/editor/lib/Drupal/editor/Ajax/EditorDialogSave.php b/core/modules/editor/lib/Drupal/editor/Ajax/EditorDialogSave.php index 047336f..a340762 100644 --- a/core/modules/editor/lib/Drupal/editor/Ajax/EditorDialogSave.php +++ b/core/modules/editor/lib/Drupal/editor/Ajax/EditorDialogSave.php @@ -13,9 +13,10 @@ * Provides an AJAX command for saving the contents of an editor dialog. * * This command is implemented in editor.dialog.js in - * Drupal.ajax.prototype.commands.EditorDialogSave. + * Drupal.AjaxCommands.prototype.editorDialogSave. */ class EditorDialogSave implements CommandInterface { + /** * An array of values that will be passed back to the editor by the dialog. * @@ -34,7 +35,7 @@ public function __construct($values) { } /** - * Implements \Drupal\Core\Ajax\CommandInterface::render(). + * {@inheritdoc} */ public function render() { return array( diff --git a/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php b/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php index 2de4ec3..2da9f0b 100644 --- a/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php +++ b/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php @@ -15,7 +15,7 @@ use Drupal\Core\Ajax\CloseModalDialogCommand; /** - * Provides a configuration import form. + * Provides an image dialog for text editors. */ class EditorImageDialog implements FormInterface { @@ -43,7 +43,7 @@ public function buildForm(array $form, array &$form_state, FilterFormat $filter_ $form['#suffix'] = ''; // Everything under the "attributes" key is merged directly into the - // generate img tag's attributes. + // generated img tag's attributes. $form['attributes']['src'] = array( '#title' => t('URL'), '#type' => 'textfield', diff --git a/core/modules/editor/lib/Drupal/editor/Form/EditorLinkDialog.php b/core/modules/editor/lib/Drupal/editor/Form/EditorLinkDialog.php index 446efdb..3066392 100644 --- a/core/modules/editor/lib/Drupal/editor/Form/EditorLinkDialog.php +++ b/core/modules/editor/lib/Drupal/editor/Form/EditorLinkDialog.php @@ -15,7 +15,7 @@ use Drupal\Core\Ajax\CloseModalDialogCommand; /** - * Provides a configuration import form. + * Provides a link dialog for text editors. */ class EditorLinkDialog implements FormInterface { @@ -43,7 +43,7 @@ public function buildForm(array $form, array &$form_state, FilterFormat $filter_ $form['#suffix'] = ''; // Everything under the "attributes" key is merged directly into the - // generate img tag's attributes. + // generated link tag's attributes. $form['attributes']['href'] = array( '#title' => t('URL'), '#type' => 'textfield',