tfd/statamic-bard-text-styles

v1.0.3 2022-04-04 13:31 UTC

This package is auto-updated.

Last update: 2024-05-04 18:07:30 UTC


README

Statamic v3 Packagist Test Suite

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