jacksleight / bard-paragraph-style
Installs: 68 422
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- statamic/cms: ~3.1.14 || 3.2.* || 3.3.*
README
Bard Paragraph Style
⚠️ Do Not Use: This addon has been superseded by Bard Texstyle, which offers everything this does and more. If you're using this already check the migration guide.
This Statamic addon gives you the ability to add custom paragraph styles to the Bard fieldtype.
Installation
Install the addon using Composer:
composer require jacksleight/bard-paragraph-style
Configuration
Publish the config:
php please vendor:publish --tag=bard-paragraph-style-config
Open config/bard-paragraph-style.php
and add your paragraph styles:
return [ 'styles' => [ [ 'name' => 'Introduction Paragraph', 'ident' => 'I', 'class' => 'intro', 'button' => 'introduction', 'cp_css' => 'font-size: 1.25em', ], ], ];
Each style should consist of:
- name (string): The name of the style. This will appear in the button tooltip.
- ident (string): A short identification string (one or two characters). This will appear in the button icon.
- class (string): The class name that will be applied to the paragraph element when rendered on the site.
- button (string): The name of the button that'll be added to the Bard field's buttons list.
- cp_css (string): The CSS properties that will be added to the control panel for this style.
Finally open your blueprint or fieldset YAML file and add the button(s) to your Bard field's buttons list:
- handle: my_field field: type: bard buttons: - introduction