$this->
assertNotEmpty($assert_session->
waitForElement('css', '.ckeditor5-toolbar-item-sourceEditing'
));
$this->
triggerKeyUp('.ckeditor5-toolbar-item-sourceEditing', 'ArrowDown'
);
$assert_session->
assertWaitOnAjaxRequest();
// Updating Source Editing's editable tags should automatically update
// filter_html to include those additional tags.
$assert_session->
waitForText('Source editing'
);
$page->
find('css', '[href^="#edit-editor-settings-plugins-ckeditor5-sourceediting"]'
)->
click();
$assert_session->
assertWaitOnAjaxRequest();
$assert_session->
waitForText('Manually editable HTML tags'
);
$source_edit_tags_field =
$assert_session->
fieldExists('editor[settings][plugins][ckeditor5_sourceEditing][allowed_tags]'
);
$source_edit_tags_field->
setValue('<aside>'
);
$assert_session->
assertWaitOnAjaxRequest();
$this->
assertHtmlEsqueFieldValueEquals('filters[filter_html][settings][allowed_html]', '<br> <p> <h2> <h3> <h4> <h5> <h6> <aside> <strong> <em> <blockquote>'
);
$allowed_html_field =
$assert_session->
fieldExists('filters[filter_html][settings][allowed_html]'
);
$this->
assertTrue($allowed_html_field->
hasAttribute('readonly'
));
// Adding tags to Source Editing's editable tags that are already supported
// by enabled CKEditor 5 plugins must trigger a validation error, and that
// error must be associated with the correct form item.
$source_edit_tags_field->
setValue('<aside><strong>'
);
$assert_session->
waitForText('The following tag(s) are already supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: Bold (<strong>)'
);