netlogix/ckeditor-linkclass

扩展CKEditor 5链接编辑器的功能,允许向选定的链接添加预配置的CSS类

安装数: 1,610

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 5

分支: 0

开放性问题: 2

语言:JavaScript

类型:neos-package

1.0.0 2022-03-07 12:02 UTC

README

此包扩展了CKEditor 5链接编辑器,使其能够向选定的链接添加预配置的CSS类。

安装

composer require netlogix/ckeditor-linkclass

使用方法

  1. 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'
  1. 定义哪些先前定义的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.jsPlugin.js.map