lampone / bard-style-select
v1.0.1
2021-06-19 15:17 UTC
Requires
- php: ^7.4|^8.0
- statamic/cms: ^3.1.25
README
允许您选择预定义的样式(类)并将它们应用到内联文本。
安装
使用Composer安装插件
composer require lampone/bard-style-select
发布配置以定义您自己的样式
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 ], ] ];
将 styleselect
添加到 Bard 蓝图,以在您想要的位置显示
buttons: - h2 - h3 - bold - italic - styleselect - unorderedlist - orderedlist - removeformat - quote - anchor - image - table
感谢
感谢 https://github.com/jacksleight/bard-paragraph-style 和 https://github.com/xndbogdan/statamic-bard-text-color 提供的 Bard 插件开发示例。