Skip to content

A Statamic addon that allows you to create different paragraph styles in Bard fieldtypes.

License

Notifications You must be signed in to change notification settings

MrMooky/bard-paragraph-style

 
 

Repository files navigation

Statamic Packagist version License

Bard Paragraph Style

This Statamic addon allows you to create different paragraph styles in Bard fieldtypes.

Installation

Install the addon using Composer:

composer require jacksleight/bard-paragraph-style

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'  => 'introduction',
            'cp_css' => 'font-size: 1.25em',
        ],
    ],

];

Each style should consist of:

  • name: The name of the style. This will appear in the button tooltip.
  • ident: A short identification string (one or two characters). This will appear in the button icon.
  • class: The class name that will be applied to the paragraph element when rendered on the site.
  • cp_css: The CSS properties that will be added to the control panel for this style.

About

A Statamic addon that allows you to create different paragraph styles in Bard fieldtypes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.5%
  • PHP 45.5%