jacksleight / bard-paragraph-style
1.2.3
2022-05-05 09:53 UTC
Requires
- statamic/cms: ~3.1.14 || 3.2.* || 3.3.*
README
Bard Paragraph Style
⚠️ 不要使用: 此插件已被 Bard Texstyle 取代,它提供了所有这些功能以及更多。如果你已经在使用它,请 查看迁移指南。
此Statamic插件允许你向Bard字段类型添加自定义段落样式。
安装
使用Composer安装插件
composer require jacksleight/bard-paragraph-style
配置
发布配置
php please vendor:publish --tag=bard-paragraph-style-config
打开 config/bard-paragraph-style.php
并添加你的段落样式
return [ 'styles' => [ [ 'name' => 'Introduction Paragraph', 'ident' => 'I', 'class' => 'intro', 'button' => 'introduction', 'cp_css' => 'font-size: 1.25em', ], ], ];
每个样式应包括
- 名称 (字符串): 样式的名称。这将在按钮工具提示中显示。
- 标识 (字符串): 短标识字符串(一个或两个字符)。这将在按钮图标中显示。
- 类 (字符串): 当在网站上渲染段落元素时将应用到的类名。
- 按钮 (字符串): 将添加到Bard字段按钮列表中的按钮名称。
- 控制面板CSS (字符串): 将添加到此样式的控制面板的CSS属性。
最后,打开你的蓝图或fieldset YAML文件,并将按钮添加到Bard字段的按钮列表中
- handle: my_field field: type: bard buttons: - introduction