Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.6 Update released for Drupal core (11.4.6)! Release: Drupal 10.6.16 Update released for Drupal core (10.6.16)! Release: Drupal 12.0.0-alpha1 First alpha version released for Drupal core (12.0.0-alpha1). Release: AI (Artificial Intelligence) 1.5.0-rc3 New release candidate for module ai (1.5.0-rc3). Release: Smart Image Optimizer 1.0.1 Minor update available for module smart_image_optimizer (1.0.1). Release: EzContent API - Enhanced De-coupled CMS Experience 2.3.10 Minor update available for module ezcontent_api (2.3.10). Release: Collector Systems Gallery 1.0.11 Minor update available for module collector_systems (1.0.11). Release: EzContent API - Enhanced De-coupled CMS Experience 2.1.4 Minor update available for module ezcontent_api (2.1.4). Module Revived: EzContent API - Enhanced De-coupled CMS Experience 2.3.9 Module ezcontent_api updated after 15 months of inactivity (2.3.9). Security Coverage: Analyze PostHog Module analyze_posthog now has official Drupal security advisory coverage.

Shortcode

Security covered Drupal 9–11
View on drupal.org

Shortcodes are actually macros to be used in the text of contents. These macros change the text of the content and format the given part through the theme engine. This module defines few basic shortcodes only. (New ones will come.)

Shortcode is an API that handles the shortcode macros for text formats. You can add your own shortcode tags via this API. All tags are themeable and new tags can be provided by other modules.

Initial work is based on the Wordpress Shortcode API but was reworked for Drupal. You can nest tags (within same tags too), no need for special recursion handling.

Macros come with this module

Shortcode basic tags module

  • [quote] Replace the given text formatted like as a quote.
  • [img] Show an image.
  • [highlight] Insert a span with highlight css class around the text.
  • [button] Insert a link formatted like as a button.
  • [dropcap] Replace the given text formatted like as a dropcap.
  • [item] Insert div or span around the text with some css classes.'
  • [clear] Insert a float-clearing div for a proper layout.
  • [link] Makes an aliased link to the given path.

Shortcode modules

Plans

* separate macros module from the API
* remove input filter dependency - push this functionality to a separate module
* tests
* D8 version - The planned release date of the beta version is 4. Jan 2016.

Docs, tutorials

* Nice tutorial by Ivan Zugec: How to Use WordPress Style Shortcodes in Drupal 7
* Boost your WYSIWYG with Shortcode module by salva.
* Shortcodes in Drupal? Yes you can! by Brianna Deleasa.

Sponsorship

...have a feature you'd like to sponsor? Or just want to sponsor this project? Get in touch!

Warning!

* Since 7.x-2.21 the Shortcode Video module moved to a separated project.
* Since 7.x-2.1 the Shortcode for wysiwyg module moved to a separated project.

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.

Activity

Tracked releases
2
Tracked since
Sep 2026
Latest release
2 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
3.0.x-dev Dev 9–11 Sep 3, 2026
2.0.4 Stable 9–11 Sep 3, 2026