tfd / statamic-bard-text-styles
v1.0.3
2022-04-04 13:31 UTC
Requires
- php: ^7.4 || ^8.0
- statamic/cms: ^3.0.34 || ^3.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17.1
- orchestra/testbench: ^4.0 || ^5.0 || ^6.0
- pestphp/pest: ^0.3.15
- phpstan/phpstan: ^0.12.59
- symfony/var-dumper: ^5.2.0
README
此 Statamic 插件允许您在 Bard 编辑器中选择自定义段落样式。
安装
通过 Composer
$ composer require tfd/statamic-bard-text-styles
配置
发布配置
$ php please vendor:publish --tag=bard-custom-text-styles
打开 config/bard-custom-text-styles.php 并添加您的自定义段落样式
return [ 'text-copy-secondary' => [ 'title' => 'text copy secondary', 'class' => 'text-copy-secondary', 'style' => 'font-size: 14px; color: grey;', ], ];
每个样式必须使用
- title: 样式的名称,将在 Bard 选择菜单中显示。
- class: 类名,将在前端段落中添加。
- style: 行内样式,仅在 Bard 编辑器中应用,不应用于前端。
Statamic 资源
贡献
请参阅CONTRIBUTING 获取详细信息。
开发
- 运行
npm run watch
进行开发