lampone / bard-style-select
Package info
github.com/Lampone/bard-style-select
Language:JavaScript
Type:statamic-addon
pkg:composer/lampone/bard-style-select
v1.0.1
2021-06-19 15:17 UTC
Requires
- php: ^7.4|^8.0
- statamic/cms: ^3.1.25
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.