The Shortcodes API for Drupal 8 is a simple set of methods for creating Drupal 8 shortcodes for use in text fields, modules and themes.
The API enables developers to create special kinds of content that users can attach to certain content by adding the corresponding shortcode into the text fields or processing it in a theme’s or a module’s methods.
The API handles all the tricky parsing, eliminating the need for writing a custom regular expression for each shortcode.
Helper functions are included for setting and fetching default attributes. The API supports both self-closing and enclosing shortcodes.
You can create shortcodes in two ways:
Through admin panel (no programming skills needed) This way provides creating simple shortcodes with limited set of functionality. If you need more advanced usage you need to code custom shortcodes.
Programmatically (using API directly in your code) This way provides full functionality for creating shortcodes.
The shortcodes can be displayed in different ways:
Shortcodes API 8.x-1.1, 14-Oct-2016 ----------------------------------- - Fixed issue with 'Select all' checkbox missing in shortcodes tableselect. - Created shortcodes.api.php file. - Implement hook_help. - Created method for building enabled shortcodes by text format. - Method getModules renamed to getProviders in service class. - Updated readme file. - Created submodule Shortcodes Embed for inserting shortcodes into CKEditor using button and popup dialog. - Submodule Shortcodes Example updated to support shortcodes embed dialog. Shortcodes API 8.x-1.0, 01-Aug-2016 ----------------------------------- - Initial release.
$18 |
Download |
0 average based on 0 ratings.
| Last Update | 2016-10-19 |
| Created | 2016-08-11 |
| Sales | 10 |
| Discussion | Comments |
| Compatible Browsers | IE9 IE10 IE11 Firefox Safari Opera Chrome Edge |
| Software Version | Drupal 8.2.x Drupal 8.1.x Drupal 8.0.x |
| High Resolution | |
| Files Included | JavaScript JS HTML CSS PHP |
| Video Preview Resolution |