netlogix / ckeditor-linkclass
扩展CKEditor 5链接编辑器的功能,允许向选定的链接添加预配置的CSS类
1.0.0
2022-03-07 12:02 UTC
Requires
- neos/neos: *
- neos/neos-ui: ^4.0 || ^5.0 || ^7.0
This package is auto-updated.
Last update: 2024-09-19 13:27:42 UTC
README
此包扩展了CKEditor 5链接编辑器,使其能够向选定的链接添加预配置的CSS类。
安装
composer require netlogix/ckeditor-linkclass
使用方法
- 在
Settings.yaml
中定义哪些CSS类对于具体的Neos CMS安装是可用的链接
Netlogix: CkEditor: LinkClass: options: 'primaryButton': label: 'Primary Button' class: 'btn btn-primary' position: '10' 'secondaryButton': label: 'Secondary Button' class: 'btn btn-secondary' position: '20'
- 定义哪些先前定义的CSS类可以应用于具体Neos CMS安装的各个节点类型的属性中
'Neos.Demo:Text': properties: text: ui: inline: editorOptions: linking: netlogixLinkClass: primaryButton: true secondaryButton: true
贡献
欢迎通过提交拉取请求、添加问题等方式进行贡献。
修改包的JavaScript源代码后,可以使用以下步骤重新构建JavaScript文件
cd Resources/Private/CKEditor/LinkClass
nvm use
yarn
yarn build
然后提交修改后的文件,包括Plugin.js
和Plugin.js.map
。