function hook_gutenberg_blocks_alter in Gutenberg 8
Same name and namespace in other branches
- 8.2 gutenberg.api.php \hook_gutenberg_blocks_alter()
DEPRECATED.
You can use Drupal libraries. Check gutenberg.libraries.yml for an example. Modify the list of CSS and JS files for blocks.
Parameters
array $js_files_edit: An array of all js files to be included on the editor.
array $css_files_edit: An array of all css files to be included on the editor.
array $css_files_view: An array of all css files to be included on the node view.
1 function implements hook_gutenberg_blocks_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- gutenberg_cloud_gutenberg_blocks_alter in modules/
gutenberg_cloud/ gutenberg_cloud.module - Implements hook_gutenberg_blocks_alter().
1 invocation of hook_gutenberg_blocks_alter()
- gutenberg_library_info_alter in ./
gutenberg.module - Implements hook_library_info_alter().
File
- ./
gutenberg.api.php, line 44 - Documentation for Gutenberg module APIs.
Code
function hook_gutenberg_blocks_alter(array &$js_files_edit, array &$css_files_edit, array &$css_files_view) {
$js_files_edit[] = '/path/to/js/files';
$css_files_edit[] = '/path/to/css/files';
$css_files_view[] = '/path/to/css/files';
}