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

how to add plugins of ckeditor in nuxt with ssr #54

Closed
imsidz opened this issue May 5, 2019 · 4 comments
Closed

how to add plugins of ckeditor in nuxt with ssr #54

imsidz opened this issue May 5, 2019 · 4 comments
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). type:question

Comments

@imsidz
Copy link

imsidz commented May 5, 2019

i am trying to add Alignment plugins of ckeditor 5 in my nuxt app which is universal (SSR)

i tried like this in plugins

import Vue from 'vue'
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
import VueCkeditor from 'vue-ckeditor5'

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


const options = {

    editors: {
        classic: ClassicEditor,

    },
    name: 'ckeditor'
}

Vue.use(VueCkeditor.plugin, options);

i also tried direct import to page like this

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

getting error

Unexpected identifier

Normal editorConfig is working fine

editorConfig: {

      image: {

        toolbar: ['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'],

                styles: [

                'full',


               'alignLeft',


               'alignRight'
           ]
         },
         alignment: {
           options: [ 'left', 'right' ]
         },
         toolbar: {
           items: [
            'heading',
            'bold',
            'italic',
            'link',
            'bulletedList',
            'numberedList',
            'blockQuote',
            'insertTable',
            'imageUpload',
            'mediaEmbed',
            'alignment'
          ]
       }
    },
@Mgsy
Copy link
Member

Mgsy commented May 6, 2019

Hello, you have to prepare a custom build with alignment plugin. Please, take a look at our installing plugins guide.

@Mgsy Mgsy closed this as completed May 6, 2019
@imsidz
Copy link
Author

imsidz commented May 6, 2019

i didn't try custom build i am using normal vue ckeditor

@Mgsy
Copy link
Member

Mgsy commented May 6, 2019

i didn't try custom build i am using normal vue ckeditor

I understand, but at first, you have to create a custom build with alignment plugin enabled, then import it to your Vue application.

@imsidz
Copy link
Author

imsidz commented May 6, 2019

@Mgsy it means i can use external plugins only in custom build ckeditor

@Reinmar Reinmar added resolution:resolved This issue was already resolved (e.g. by another ticket). and removed resolution:solved labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). type:question
Projects
None yet
Development

No branches or pull requests

3 participants