// Allowed HTML field is readonly and its wrapper has a form-disabled class.
$this->
assertNotEmpty($assert_session->
waitForElement('css', '.js-form-item-filters-filter-html-settings-allowed-html.form-disabled'
));
$allowed_html_field =
$assert_session->
fieldExists('filters[filter_html][settings][allowed_html]'
);
$this->
assertTrue($allowed_html_field->
hasAttribute('readonly'
));
$this->
assertSame($this->allowedElements,
$allowed_html_field->
getValue());
$this->
saveNewTextFormat($page,
$assert_session);
$assert_session->
pageTextContains('Added text format ckeditor5'
);
$assert_session->
pageTextContains('Text formats and editors'
);
// Confirm the filter config was updated with the correct allowed tags.
$this->
assertSame($this->allowedElements, FilterFormat::
load('ckeditor5'
)->
filters('filter_html'
)->
getConfiguration()['settings'
]['allowed_html'
]);
$page->
find('css', '[data-drupal-selector="edit-formats-ckeditor5"]'
)->
clickLink('Configure'
);
$assert_session->
assertWaitOnAjaxRequest();
// Add the block quote plugin to the CKEditor 5 toolbar.
$this->
assertNotEmpty($assert_session->
waitForElement('css', '.ckeditor5-toolbar-item-blockQuote'
));
$this->
triggerKeyUp('.ckeditor5-toolbar-item-blockQuote', 'ArrowDown'
);
$assert_session->
assertWaitOnAjaxRequest();
$allowed_with_blockquote =
$this->allowedElements . ' <blockquote>';
$assert_session->
fieldExists('filters[filter_html][settings][allowed_html]'
);