Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add custom plugins/options #7

Open
nsrosenqvist opened this issue Aug 15, 2019 · 4 comments
Open

Can't add custom plugins/options #7

nsrosenqvist opened this issue Aug 15, 2019 · 4 comments

Comments

@nsrosenqvist
Copy link

If I read the code correctly, only select keys are extracted from the field's config (e.g. "toolbar", "heading"):

FormField.vue

    data () {
        return {
            editor: ClassicEditor,
            defaultEditorConfig: {
                nova: {
                    resourceName: this.resourceName,
                    field: this.field,
                    draftId: uuidv4()
                },
                language: 'en',
                toolbar: this.field.options.toolbar,
                heading: this.field.options.heading,
                image: this.field.options.image,
                fontFamily: this.field.options.fontFamily,
                extraPlugins: [
                    this.createUploadAdapterPlugin
                ]
            }
        }
    },

So I can't include a script that attaches extra plugins to window in order to be loaded by the editor. Something like this wouldn't work:

js

import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';

window.CKPlugins = {
    Alignment,
};

php

                    CKEditor5Classic::make('Body')->withFiles('public')->options([
                        "plugins" => [
                            'CKPlugins.Alignment',
                        ],
                        "toolbar" => [
                            'heading', '|', 'alignment',
                        ],
                        "alignment" => [
                            'left', 'center', 'right', 'justify'
                        ],
                    ]),

In the above case neither the key "plugins" nor "alignment" would be included. Can't simply all options specified be passed on to CK rather than select keys?

@cannycookie
Copy link

Any update on this? Alignment is an essential plugin for CMS editing.

@ablunier
Copy link
Contributor

No @cannycookie, had no time to close this issue. Sorry.

@cannycookie
Copy link

No problem @ablunier we've gone with Froala editor now. It's awesome. Not free but totally worth paying for and easy integration with Nova. :-) .

@czim
Copy link

czim commented Apr 1, 2021

Any update on this? We're very interested in using this package, but if there is not option to install other plugins, its hard to recommend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants