wedevelopnl / silverstripe-highlights

Silverstripe模块,用于添加数据库字符串的短代码高亮。

安装: 3

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 7

分支: 0

开放问题: 0

类型:silverstripe-vendormodule

1.0.0 2024-03-26 14:27 UTC

This package is auto-updated.

Last update: 2024-08-26 16:57:43 UTC


README

此模块在所有SS DBStrings上创建一个.Highlight方法,提供通过放置可由您自定义的短代码之间来自定义文本高亮的能力。

需求

  • 查看composer.json需求

安装

  • composer require wedevelopnl/silverstripe-highlights

接下来,您需要运行一个dev/build命令,带有flush=all选项,以便此模块能够正常工作。

许可协议

查看许可协议

维护者

配置

SilverStripe\ORM\FieldType\DBString:
    shortcode_start: '['
    shortcode_end: ']'
    css_class_name: 'highlight'

示例

输入

This is a [large] content string which outputs HTML around the word 'large'.

输出

This is a <span class="highlight">large</span> content string which outputs HTML around the word 'large'.

开发和贡献

欢迎Pull请求。对于重大更改,请先打开一个问题来讨论您希望更改的内容。有关更多信息,请参阅我们的贡献文档。