firesphere / wysiwyg-font-awesome
使用简码将Font Awesome图标添加到内容中
Requires
- silverstripe/cms: ^3.2
- silverstripe/framework: ^3.2
This package is auto-updated.
Last update: 2024-09-16 19:01:46 UTC
README
安装
composer require firesphere/wysiwyg-font-awesome
使用
将FontAwesome CSS添加到前端。否则,字体将无法加载。
在您的WYSIWYG中添加[fa icon="icon-name" {optional: spin="" rotate="90" size="1|2|3|4" flip="horizontal|vertical"}]
注意,花括号内的值不是必需的,但是在spin
的情况下,必须有一个空参数。这是当前Framework中ShortcodeParser的一个缺点。
在您的内容中,每个[fa icon="my-icon"]
将被渲染为<i class="fa fa-my-icon optional-items"></i>
添加自定义修饰符
在您的config.yml中
FontAwesomeParser: modifiers: mymodifier: code: 'modifyme' arguments: true|false
如果修饰符需要参数,则将其设置为true,否则为false(仍然需要一个空参数)。
实际许可证
此模块根据BSD 3条款许可证发布,尽管这些许可证不在实际类中,但许可证确实适用
https://open-source.org.cn/licenses/BSD-2-Clause
版权(c)2017-NOW(), Simon "Sphere" Erkelens
版权所有。
在满足以下条件的情况下,允许重新分发和使用源代码和二进制形式,无论是否修改:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
本软件由版权所有者和贡献者提供“现状”以及任何明示或暗示的保证,包括但不限于适销性和针对特定目的的适用性保证。在任何情况下,版权所有者或贡献者均不对任何直接、间接、偶然、特殊、示范性或后果性损害(包括但不限于替代商品或服务的采购;使用、数据或利润的损失;或业务中断)承担责任,即使被告知了此类损害的可能性。即使被告知了此类损害的可能性,版权所有者或贡献者也不承担任何责任。
(我应该尖叫吗?这是从BSD-2许可证中复制粘贴的...)
牛?
当然!
/( ,,,,, )\
_\,;;;;;;;,/_
.-"; ;;;;;;;;; ;"-.
'.__/`_ / \ _`\__.'
| (')| |(') |
| .--' '--. |
|/ o o \|
| |
/ \ _..=.._ / \
/:. '._____.' \
;::' / \ .;
| _|_ _|_ ::|
.-| '==o==' '|-.
/ | . / \ | \
| | ::| | | .|
| ( ') (. )::|
|: | |; U U ;|:: | `|
|' | | \ U U / |' | |
##V| |_/`"""`\_| |V##
##V## ##V##