Part of the Bootstrap ecosystem · 46 projects
This module enhances content creation for Bootstrap themes by providing text filters that automatically apply Bootstrap classes to HTML elements. It offers filters for tables, blockquotes, figures, and images to easily leverage Bootstrap's styling capabilities.
Bootstrap Utilities is a module that adds Filter options for easy content creation using a Bootstrap theme in Drupal. When you use Bootstrap 4 or Bootstrap 5 in your site, this module helps you to use Bootstrap with less hassle. It comes with 4 text filters. These filters will add Bootstrap classes automatic to HTML elements, so Bootstrap styles are applied automatic.
The text filters using xPath to apply the classes. No regular expressions are used to keep high performance.
Text editor filters:
Table filter options
- Remove
widthandheightattributes from table cells. - Adds
.table-stripedto add zebra-striping to any table row within the<tbody>. - Adds
.table-hoverto enable a hover state on table rows within a<tbody>. - Adds
.table-smto make tables more compact by cutting cell padding in half. - Remove
widthandheightattributes from table cells, so table behaves more responsive.
Blockquote filter
This filter will allow you to add default Bootstrap classes to a blockquote
Figure filter
This filter will allow you to add default Bootstrap classes to a figure HTML element and its caption.
Image filter
This filter will allow you to add a default Bootstrap class to each image HTML element.
Module installation
Install Drupal module as usual. Visit https://www.drupal.org/docs/extending-drupal/installing-modules for further information.
Add the desired filters via: Home » Administration » Configuration » Content authoring » Text formats and editors.
Recommended modules
This module enrich the editor experience together with other utility and filter modules like:
Ask your assistant about Bootstrap Utilities - Text editor filters
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- filter Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Bootstrap ecosystem
Most installed first