lampone/bard-style-select

安装: 43

依赖项: 0

建议者: 0

安全性: 0

星星: 0

关注者: 1

分支: 0

开放性问题: 0

语言:JavaScript

类型:statamic-addon

v1.0.1 2021-06-19 15:17 UTC

This package is auto-updated.

Last update: 2024-09-27 22:53:39 UTC


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-stylehttps://github.com/xndbogdan/statamic-bard-text-color 提供的 Bard 插件开发示例。