lampone / bard-style-select
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:statamic-addon
Requires
- php: ^7.4|^8.0
- statamic/cms: ^3.1.25
README
Lets you select of predefined styles (classes) and apply them to inline text.
Installation
Install the addon using Composer:
composer require lampone/bard-style-select
Publish the config to define your own styles:
php please vendor:publish --tag=bard-style-select-config
return [ 'styles' => [ [ 'classes' => 'custom-underline', // written like in html "class-1 class-2" 'name' => 'Custom Underline', // name display in cp 'cp_style' => 'border-bottom: 1px solid gray;' // style applied in cp ], ] ];
Add styleselect
to the bard blueprint, to show at the position you want to
buttons: - h2 - h3 - bold - italic - styleselect - unorderedlist - orderedlist - removeformat - quote - anchor - image - table
Thanks
Thanks to https://github.com/jacksleight/bard-paragraph-style and https://github.com/xndbogdan/statamic-bard-text-color for examples on how to develop a Bard-Plugin.