Commit 0fa19e0a authored by Cottser's avatar Cottser

Issue #2626570 by Wim Leers, thpoul, DuaelFr: Drupal 8's custom Image and Link...

Issue #2626570 by Wim Leers, thpoul, DuaelFr: Drupal 8's custom Image and Link plugins do not include a HiDPI icon
parent 0bbd5d3f
......@@ -19,6 +19,8 @@
CKEDITOR.plugins.add('drupalimage', {
requires: 'image2',
icons: 'drupalimage',
hidpi: true,
beforeInit: function (editor) {
// Override the image2 widget definition to require and handle the
......@@ -270,8 +272,7 @@
editor.ui.addButton('DrupalImage', {
label: Drupal.t('Image'),
// Note that we use the original image2 command!
command: 'image',
icon: this.path + '/image.png'
command: 'image'
});
}
},
......
......@@ -62,6 +62,9 @@
}
CKEDITOR.plugins.add('drupallink', {
icons: 'drupallink,drupalunlink',
hidpi: true,
init: function (editor) {
// Add the commands for link and unlink.
editor.addCommand('drupallink', {
......@@ -195,13 +198,11 @@
if (editor.ui.addButton) {
editor.ui.addButton('DrupalLink', {
label: Drupal.t('Link'),
command: 'drupallink',
icon: this.path + '/link.png'
command: 'drupallink'
});
editor.ui.addButton('DrupalUnlink', {
label: Drupal.t('Unlink'),
command: 'drupalunlink',
icon: this.path + '/unlink.png'
command: 'drupalunlink'
});
}
......
......@@ -56,7 +56,7 @@ public function getButtons() {
return array(
'DrupalImage' => array(
'label' => t('Image'),
'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/image.png',
'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/icons/drupalimage.png',
),
);
}
......
......@@ -55,11 +55,11 @@ public function getButtons() {
return array(
'DrupalLink' => array(
'label' => t('Link'),
'image' => $path . '/link.png',
'image' => $path . '/icons/drupallink.png',
),
'DrupalUnlink' => array(
'label' => t('Unlink'),
'image' => $path . '/unlink.png',
'image' => $path . '/icons/drupalunlink.png',
),
);
}
......
......@@ -74,7 +74,7 @@ public function testImageButtonDisplay() {
$json_encode = function($html) {
return trim(Json::encode($html), '"');
};
$markup = $json_encode(file_url_transform_relative(file_create_url('core/modules/ckeditor/js/plugins/drupalimage/image.png')));
$markup = $json_encode(file_url_transform_relative(file_create_url('core/modules/ckeditor/js/plugins/drupalimage/icons/drupalimage.png')));
$this->assertRaw($markup);
}
......
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