wedevelopnl / silverstripe-highlights
Silverstripe module to add shortcode highlights for DB strings.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: ^8.1
- silverstripe/framework: ^5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.20
- syntro/silverstripe-phpstan: ^5.0
This package is auto-updated.
Last update: 2024-11-26 17:26:40 UTC
README
This module creates a .Highlight
method on all SS DBStrings to provide the ability to highlight custom texts by placing it between shortcodes that are configurable by yourself.
Requirements
- See
composer.json
requirement
Installation
composer require wedevelopnl/silverstripe-highlights
Next, you'll need to run a dev/build
with a flush=all
to allow this module to work properly.
License
See License
Maintainers
Configuration
SilverStripe\ORM\FieldType\DBString: shortcode_start: '[' shortcode_end: ']' css_class_name: 'highlight'
Example
Input
This is a [large] content string which outputs HTML around the word 'large'.
Output
This is a <span class="highlight">large</span> content string which outputs HTML around the word 'large'.
Development and contribution
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See read our contributing document for more information.