Loading src/Plugin/CKEditor5Plugin/PasteFilter.php +3 −1 Changes for src/Plugin/CKEditor5Plugin/PasteFilter.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi $form['help'] = [ '#type' => 'details', '#title' => $this->t('Help'), '#access'=> $this->configuration['enabled'], ]; $form['help']['info']['#markup'] = ''; $form['help']['info']['#markup'] .= '<p>' . $this->t('Content pasted into the editor will be processed through the configured filters.') . '</p>'; Loading @@ -155,7 +156,6 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi ], ]; // @todo Consider hiding if enabled checkbox is not checked (via #states). $wrapper_id = 'paste-filters-wrapper'; $form['filters'] = [ '#type' => 'table', Loading @@ -178,6 +178,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi '#prefix' => '<div id="' . $wrapper_id . '">', '#suffix' => '</div>', '#after_build' => [[static::class, 'sortFilterRows']], '#access'=> $this->configuration['enabled'], ]; $filters = $this->configuration['filters']; Loading @@ -195,6 +196,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi $form['actions'] = [ '#type' => 'actions', '#access'=> $this->configuration['enabled'], ]; $form['actions']['add-row'] = [ Loading tests/src/Nightwatch/Tests/ckEditor5PasteFilterConfigTest.js +5 Changes for tests/src/Nightwatch/Tests/ckEditor5PasteFilterConfigTest.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -239,6 +239,11 @@ module.exports = { ) .submitForm('[data-drupal-selector="edit-actions-submit"]') .waitForElementVisible("[data-drupal-messages]") // Ensure the filter table, help, and "Add another" button are not // visible when the plugin is disabled. .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-filters"]') .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-help"]') .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-actions"]') .drupalRelativeURL("/node/add/test") .waitForElementVisible(".ck-editor__editable") .click(".ck-editor__editable") Loading tests/src/Nightwatch/Tests/ckEditor5PasteFilterWeightsTest.js +3 Changes for tests/src/Nightwatch/Tests/ckEditor5PasteFilterWeightsTest.js: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ module.exports = { '[data-drupal-selector="edit-editor-settings-plugin-settings"]' ) .click("link text", "Paste filter") .click( '[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-enabled"]' ) .assert.valueEquals( { selector: Loading Loading
src/Plugin/CKEditor5Plugin/PasteFilter.php +3 −1 Changes for src/Plugin/CKEditor5Plugin/PasteFilter.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi $form['help'] = [ '#type' => 'details', '#title' => $this->t('Help'), '#access'=> $this->configuration['enabled'], ]; $form['help']['info']['#markup'] = ''; $form['help']['info']['#markup'] .= '<p>' . $this->t('Content pasted into the editor will be processed through the configured filters.') . '</p>'; Loading @@ -155,7 +156,6 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi ], ]; // @todo Consider hiding if enabled checkbox is not checked (via #states). $wrapper_id = 'paste-filters-wrapper'; $form['filters'] = [ '#type' => 'table', Loading @@ -178,6 +178,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi '#prefix' => '<div id="' . $wrapper_id . '">', '#suffix' => '</div>', '#after_build' => [[static::class, 'sortFilterRows']], '#access'=> $this->configuration['enabled'], ]; $filters = $this->configuration['filters']; Loading @@ -195,6 +196,7 @@ class PasteFilter extends CKEditor5PluginDefault implements CKEditor5PluginConfi $form['actions'] = [ '#type' => 'actions', '#access'=> $this->configuration['enabled'], ]; $form['actions']['add-row'] = [ Loading
tests/src/Nightwatch/Tests/ckEditor5PasteFilterConfigTest.js +5 Changes for tests/src/Nightwatch/Tests/ckEditor5PasteFilterConfigTest.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -239,6 +239,11 @@ module.exports = { ) .submitForm('[data-drupal-selector="edit-actions-submit"]') .waitForElementVisible("[data-drupal-messages]") // Ensure the filter table, help, and "Add another" button are not // visible when the plugin is disabled. .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-filters"]') .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-help"]') .assert.not.elementPresent('[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-actions"]') .drupalRelativeURL("/node/add/test") .waitForElementVisible(".ck-editor__editable") .click(".ck-editor__editable") Loading
tests/src/Nightwatch/Tests/ckEditor5PasteFilterWeightsTest.js +3 Changes for tests/src/Nightwatch/Tests/ckEditor5PasteFilterWeightsTest.js: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ module.exports = { '[data-drupal-selector="edit-editor-settings-plugin-settings"]' ) .click("link text", "Paste filter") .click( '[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-paste-filter-pastefilter-enabled"]' ) .assert.valueEquals( { selector: Loading