tfd / statamic-bard-text-styles
Installs: 170
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: ^7.4 || ^8.0
- statamic/cms: ^3.0.34 || ^3.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17.1
- orchestra/testbench: ^4.0 || ^5.0 || ^6.0
- pestphp/pest: ^0.3.15
- phpstan/phpstan: ^0.12.59
- symfony/var-dumper: ^5.2.0
README
This addon for Statamic allows you to select custom paragraph styles in the bard editor.
Installation
Via Composer
$ composer require tfd/statamic-bard-text-styles
Configuration
Publish the configuration:
$ php please vendor:publish --tag=bard-custom-text-styles
Open config/bard-custom-text-styles.php and add your custom paragraph styles:
return [ 'text-copy-secondary' => [ 'title' => 'text copy secondary', 'class' => 'text-copy-secondary', 'style' => 'font-size: 14px; color: grey;', ], ];
Each style must use:
- title: The name of the style, shown in the bard select menu.
- class: The class name, that will be added to the paragraph in the frontend.
- styleb: The inline style, that is only applied in the bard editor itself, not the frontend.
Statamic Resources
Contributing
Please see CONTRIBUTING for details.
Development
- run
npm run watch
to develop