0.0.3 • Published 6 months ago

ws-strapi-plugin-ckeditor v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

CKeditor плагин для Strapi CMS. Модифицированный форк https://github.com/nshenderov/strapi-plugin-ckeditor

Для объявления кастомной версии или изменения существующих необходимо объявить конфиг /config/ckeditor.txt

globalThis.CKEditorConfig = {
    configs:{
        custom:{
            field: {
                key: "custom",
                value: "custom",
                metadatas: {
                  intlLabel: {
                    id: "ckeditor5.preset.custom.label",
                    defaultMessage: "Custom version",
                  },
                },
            },
            editorConfig:{
                plugins: [
                    CKEditor5.heading.Heading,
                  ],
                  toolbar: [
                    'heading',
                    '|',
                    'undo', 'redo'
                  ],
                  heading: {
                    options: [
                      { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
                      { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
                      { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
                      { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
                      { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
                    ]
                  },
            }
        },
        light:{
            field: {
                key: "light",
                value: "light",
                metadatas: {
                    intlLabel: {
                        id: "ckeditor5.preset.light.label",
                        defaultMessage: "Cutom light version",
                    },
                },
            },
            editorConfig:{
                plugins: [
                    CKEditor5.heading.Heading,
                ],
                toolbar: [
                    'heading',
                ],
                heading: {
                    options: [
                        { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
                        { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
                    ]
                },
            }
        }
    },
}