Skip to content

Commit

Permalink
Update hook changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil Sharma committed Nov 15, 2024
1 parent b4d3de1 commit 59ea282
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 0 additions & 6 deletions config/install/filter.format.rich_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 11 additions & 4 deletions modules/tide_ckeditor/tide_ckeditor.install
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 59ea282

Please sign in to comment.