Commit c9bd67a8 authored by alexpott's avatar alexpott

Issue #2342633 by Wim Leers, wwalc: Fixed CKEditor context menu broken due to...

Issue #2342633 by Wim Leers, wwalc: Fixed CKEditor context menu broken due to an error in the drupalimage plugin.
parent 01de84e7
......@@ -197,20 +197,6 @@
icon: this.path + '/image.png'
});
}
// Register context menu option for editing widget.
if (editor.contextMenu) {
editor.addMenuItem('drupalimage', {
label: Drupal.t('Image Properties'),
command: 'editdrupalimage',
group: 'image'
});
editor.contextMenu.addListener(function (element, selection) {
if (isImageWidget(editor, element)) {
return { drupalimage: CKEDITOR.TRISTATE_OFF };
}
});
}
},
// Disable image2's integration with the link/drupallink plugins: don't
......@@ -234,9 +220,4 @@
});
function isImageWidget(editor, element) {
var widget = editor.widgets.getByElement(element.getChild(0), true);
return widget && widget.name === 'image';
}
})(jQuery, Drupal, CKEDITOR);
......@@ -368,7 +368,7 @@ function testJSTranslation() {
$editor = entity_load('editor', 'filtered_html');
$this->ckeditor->getJSSettings($editor);
$localeStorage = $this->container->get('locale.storage');
$string = $localeStorage->findString(array('source' => 'Image Properties', 'context' => ''));
$string = $localeStorage->findString(array('source' => 'Edit Link', 'context' => ''));
$this->assertTrue(!empty($string), 'String from JavaScript file saved.');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment