This addon for Statamic allows you to select custom paragraph styles in the bard editor.
Via Composer
$ composer require tfd/statamic-bard-text-styles
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.
Please see CONTRIBUTING for details.
- run
npm run watch
to develop