Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
Release/2.0.4
  • Loading branch information
MdNadimHossain committed Feb 25, 2021
2 parents fdd5d3c + 4a76432 commit 1541a95
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/optional/editor.editor.admin_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ settings:
- Undo
- Redo
- ShowBlocks
- Maximize
- Source
- TemplateSelector
- Iframe
Expand Down
1 change: 1 addition & 0 deletions config/optional/editor.editor.rich_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ settings:
- Undo
- Redo
- ShowBlocks
- Maximize
- Source
- TemplateSelector
- Iframe
Expand Down
1 change: 1 addition & 0 deletions config/optional/editor.editor.summary_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ settings:
- Undo
- Redo
- ShowBlocks
- Maximize
- Source
- TemplateSelector
- Iframe
Expand Down
4 changes: 2 additions & 2 deletions modules/tide_oauth/drush.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ services:
tide_oauth.commands:
class: \Drupal\tide_oauth\Commands\TideOauthCommands
arguments: ['@tide_oauth.env_key_generator']
tags:
- { name: drush.command }
tags:
- { name: drush.command }
28 changes: 28 additions & 0 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -1013,3 +1013,31 @@ function tide_core_update_8042() {
$permissions = ['administer nodes', 'bypass node access'];
user_role_grant_permissions(Role::load('site_admin')->id(), $permissions);
}

/**
* Enable Maximize button in wysiwyg toolbar.
*/
function tide_core_update_8043() {
$config_factory = \Drupal::configFactory();
$configs = [
'editor.editor.admin_text',
'editor.editor.rich_text',
'editor.editor.summary_text',
];
foreach ($configs as $config) {
$editable_config = $config_factory->getEditable($config);
$rows = $editable_config->get('settings.toolbar.rows.0');
$updated_rows = [];

foreach ($rows as $key => $row) {
if ($row['name'] === 'Tools' && !in_array('Maximize', $row['items'])) {
// Insert Maximise inside Tools group toolbar.
array_splice($row['items'], 3, 0, 'Maximize');
}
$updated_rows[] = $row;
}

$editable_config->set('settings.toolbar.rows.0', $updated_rows);
$editable_config->save();
}
}

0 comments on commit 1541a95

Please sign in to comment.