Skip to content

Commit

Permalink
Merge branch 'SLB-415-gutenberg-editor-preview' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfield committed Jun 20, 2024
2 parents da1d7fb + 56bf8e7 commit 40710dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/drupal/gutenberg_blocks/gutenberg_blocks.module
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,16 @@ function gutenberg_blocks_form_node_form_alter(&$form, FormStateInterface $form_
$form['#attached']['drupalSettings']['customGutenbergBlocks']['forms'] = array_values($forms);
}
}

/**
* Implements hook_toolbar_alter().
*/
function gutenberg_blocks_toolbar_alter(&$items) {
// Unset the preview button from the toolbar for now,
// as it's a duplicate of the one in the editor.
// This could be configurable in the silverback_external_preview module
// based on routes.
if (array_key_exists('silverback_external_preview', $items)) {
unset($items['silverback_external_preview']);
}
}

0 comments on commit 40710dc

Please sign in to comment.