diff --git a/config/install/filter.format.rich_text.yml b/config/install/filter.format.rich_text.yml index aa932c402..479f5a7b9 100644 --- a/config/install/filter.format.rich_text.yml +++ b/config/install/filter.format.rich_text.yml @@ -82,12 +82,6 @@ filters: weight: -45 settings: replace_empty: '0' - filter_resize_tablecolumns: - id: filter_resize_tablecolumns - provider: ckeditor_tablecol_resize - status: true - weight: 99 - settings: { } linkit: id: linkit diff --git a/modules/tide_ckeditor/tide_ckeditor.install b/modules/tide_ckeditor/tide_ckeditor.install index 6cea1441a..ca5104652 100644 --- a/modules/tide_ckeditor/tide_ckeditor.install +++ b/modules/tide_ckeditor/tide_ckeditor.install @@ -40,10 +40,17 @@ function tide_ckeditor_update_10002() { if (\Drupal::moduleHandler()->moduleExists('ckeditor_tablecol_resize') === FALSE) { \Drupal::service('module_installer')->install(['ckeditor_tablecol_resize']); } - $update_service = \Drupal::service('tide_core.entity_update_helper'); // Import table col style filter in rich text format. - $config = \Drupal::configFactory()->getEditable('filter.format.rich_text'); - if ($config) { - $update_service->revert('filter.format', 'filter.format.rich_text'); + $config_factory = \Drupal::configFactory(); + $filter = $config_factory->getEditable('filter.format.rich_text'); + if ($filter) { + $filter->set('filters.filter_resize_tablecolumns', [ + 'id' => 'filter_resize_tablecolumns', + 'provider' => 'ckeditor_tablecol_resize', + 'status' => true, + 'weight' => 99, + 'settings' => [], + ]); + $filter->save(); } }