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

CKEditor error on try editing text #47

Closed
ronaldohoch opened this issue Jul 5, 2021 · 1 comment
Closed

CKEditor error on try editing text #47

ronaldohoch opened this issue Jul 5, 2021 · 1 comment

Comments

@ronaldohoch
Copy link

Hello Artf!
ckeditor-gif

Well, when i select a text and try to edit it with ckeditor, it lost the focus and the ckeditor disappear.

Is it related to "sharedspace" plugin?
I commented this part of the code because it doesn't work to me:

      // var plgName = 'sharedspace';

      // if (opt.extraPlugins) {
      //   if (typeof opt.extraPlugins === 'string')
      //     opt.extraPlugins += ',' + plgName;
      //   else
      //     opt.extraPlugins.push(plgName);
      // } else {
      //   opt.extraPlugins = plgName;
      // }

Thank you

@ronaldohoch
Copy link
Author

Answering my own issue, yes, it's because the sharedspace, i needed to download and use it.
https://ckeditor.com/cke4/addon/sharedspace

Also, needed to set the options of the plugin:

'gjs-plugin-ckeditor': {
  position: 'center',
  options: {
    startupFocus: true,
    extraAllowedContent: '*(*);*{*}', // Allows any class and any inline style
    allowedContent: true, // Disable auto-formatting, class removing, etc.
    enterMode: CKEDITOR.ENTER_BR,
    extraPlugins: 'sharedspace,justify,colorbutton,panelbutton,font',
    toolbar: [
      { name: 'styles', items: ['Font', 'FontSize' ] },
      ['Bold', 'Italic', 'Underline', 'Strike'],
      {name: 'paragraph', items : [ 'NumberedList', 'BulletedList']},
      {name: 'links', items: ['Link', 'Unlink']},
      {name: 'colors', items: [ 'TextColor', 'BGColor' ]},
    ],
  }
}

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

1 participant