diff --git a/core/modules/ckeditor/ckeditor.admin.inc b/core/modules/ckeditor/ckeditor.admin.inc index ace8422..2a5a6b2 100644 --- a/core/modules/ckeditor/ckeditor.admin.inc +++ b/core/modules/ckeditor/ckeditor.admin.inc @@ -70,10 +70,10 @@ function template_preprocess_ckeditor_settings_toolbar(&$variables) { elseif (isset($button['image_alternative'])) { $value = $button['image_alternative']; } - elseif (isset($button['image' . $rtl]) ) { + elseif (isset($button['image']) || isset($button['image' . $rtl])) { $value = array( '#theme' => 'image', - '#uri' => $button['image' . $rtl], + '#uri' => isset($button['image' . $rtl]) ? $button['image' . $rtl] : $button['image'], '#title' => $button['label'], '#prefix' => '', '#suffix' => '', diff --git a/core/modules/ckeditor/css/ckeditor.admin.css b/core/modules/ckeditor/css/ckeditor.admin.css index 35f4bff..d318737 100644 --- a/core/modules/ckeditor/css/ckeditor.admin.css +++ b/core/modules/ckeditor/css/ckeditor.admin.css @@ -187,10 +187,10 @@ overflow: hidden; } .ckeditor-buttons li .cke_ltr { - direction: ltr; + direction: ltr; } .ckeditor-buttons li .cke_rtl { - direction: rtl; + direction: rtl; } .ckeditor-buttons li a:focus, .ckeditor-buttons li a:active, diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php index dfdbe82..080c017 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php @@ -11,7 +11,6 @@ use Drupal\ckeditor\CKEditorPluginConfigurableInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\editor\Entity\Editor; -use Drupal\Core\Language\LanguageInterface; /** * Defines the "drupalimage" plugin. @@ -54,12 +53,10 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $language_interface = \Drupal::languageManager()->getCurrentLanguage(); - $rtl = $language_interface->getDirection() === LanguageInterface::DIRECTION_RTL ? '_rtl' : ''; return array( 'DrupalImage' => array( 'label' => t('Image'), - 'image' . $rtl => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/image.png', + 'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/image.png', ), ); } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php index 07613cc..dbfc07f 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php @@ -9,7 +9,6 @@ use Drupal\ckeditor\CKEditorPluginBase; use Drupal\editor\Entity\Editor; -use Drupal\Core\Language\LanguageInterface; /** * Defines the "drupallink" plugin. @@ -53,16 +52,14 @@ public function getConfig(Editor $editor) { */ public function getButtons() { $path = drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink'; - $language_interface = \Drupal::languageManager()->getCurrentLanguage(); - $rtl = $language_interface->getDirection() === LanguageInterface::DIRECTION_RTL ? '_rtl' : ''; return array( 'DrupalLink' => array( 'label' => t('Link'), - 'image' . $rtl => $path . '/link.png', + 'image' => $path . '/link.png', ), 'DrupalUnlink' => array( 'label' => t('Unlink'), - 'image' . $rtl => $path . '/unlink.png', + 'image' => $path . '/unlink.png', ), ); } diff --git a/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php b/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php index 0ff7aaf..5751f86 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php @@ -16,9 +16,9 @@ * Tests CKEditor toolbar buttons when the language direction is RTL. * * @group ckeditor - * @package Drupal\ckeditor\Tests */ class CKEditorToolbarButtonTest extends WebTestBase { + /** * Modules to enable for this test. * @@ -78,4 +78,5 @@ public function testImageButtonDisplay() { $markup = $json_encode($base_url . '/core/modules/ckeditor/js/plugins/drupalimage/image.png'); $this->assertRaw($markup); } + }