Issue #3232550 by Wim Leers, hooroomoo, xjm, ravi.shankar: Improve messaging about Internet Explorer 11

(cherry picked from commit 3744d21b8c)
merge-requests/1413/merge
Lauri Eskola 2022-02-01 15:39:41 +02:00
parent d52f147894
commit c8d6a73057
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
5 changed files with 13 additions and 7 deletions

View File

@ -38,7 +38,7 @@
const ck5Warning = () => {
selectMessages.add(
Drupal.t(
'CKEditor 5 is not compatible with Internet Explorer 11. Text fields using CKEditor 5 will still be editable but without the benefits of CKEditor.',
'CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.',
),
{
type: 'warning',
@ -48,7 +48,7 @@
// https://www.drupal.org/docs/system-requirements/browser-requirements
selectMessages.add(
Drupal.t(
'Text editor toolbar settings are not available. They will be available in any <a href="@supported-browsers">supported browser</a> other than Internet Explorer',
'Text editor toolbar settings are not available in Internet Explorer. They will be available in other <a href="@supported-browsers">supported browsers</a>.',
{
'@supported-browsers':
'https://www.drupal.org/docs/system-requirements/browser-requirements',

View File

@ -19,12 +19,12 @@
var editorSettings = document.querySelector('#editor-settings-wrapper');
var ck5Warning = function ck5Warning() {
selectMessages.add(Drupal.t('CKEditor 5 is not compatible with Internet Explorer 11. Text fields using CKEditor 5 will still be editable but without the benefits of CKEditor.'), {
selectMessages.add(Drupal.t('CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.'), {
type: 'warning'
});
if (isIE11) {
selectMessages.add(Drupal.t('Text editor toolbar settings are not available. They will be available in any <a href="@supported-browsers">supported browser</a> other than Internet Explorer', {
selectMessages.add(Drupal.t('Text editor toolbar settings are not available in Internet Explorer. They will be available in other <a href="@supported-browsers">supported browsers</a>.', {
'@supported-browsers': 'https://www.drupal.org/docs/system-requirements/browser-requirements'
}), {
type: 'error'

View File

@ -37,7 +37,11 @@
const editorMessages = new Drupal.Message(editorMessageContainer);
editorMessages.add(
Drupal.t(
'Internet Explorer 11 user: a rich text editor is available for this field when used with any other supported browser.',
'A rich text editor is available for this field when used with <a href="@supported-browsers">supported browsers</a> other than Internet Explorer.',
{
'@supported-browsers':
'https://www.drupal.org/docs/system-requirements/browser-requirements',
},
),
{
type: 'warning',

View File

@ -15,7 +15,9 @@
var editorMessageContainer = document.createElement('div');
element.parentNode.insertBefore(editorMessageContainer, element);
var editorMessages = new Drupal.Message(editorMessageContainer);
editorMessages.add(Drupal.t('Internet Explorer 11 user: a rich text editor is available for this field when used with any other supported browser.'), {
editorMessages.add(Drupal.t('A rich text editor is available for this field when used with <a href="@supported-browsers">supported browsers</a> other than Internet Explorer.', {
'@supported-browsers': 'https://www.drupal.org/docs/system-requirements/browser-requirements'
}), {
type: 'warning'
});
},

View File

@ -410,7 +410,7 @@ class CKEditor5AllowedTagsTest extends CKEditor5TestBase {
public function testInternetExplorerWarning() {
$page = $this->getSession()->getPage();
$assert_session = $this->assertSession();
$warning_text = 'CKEditor 5 is not compatible with Internet Explorer 11. Fields using CKEditor 5 will still be editable but without the benefits of CKEditor.';
$warning_text = 'CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.';
$this->createNewTextFormat($page, $assert_session);
$assert_session->waitForText($warning_text);
$page->selectFieldOption('editor[editor]', 'None');