CKEditor parsonalization

CKEditor parsonalization

marianidiegomarianidiego Posts: 46Questions: 15Answers: 1

I am trying to use the new CKEditor5, but I have some problems.

1) CKEditor 4 had the ability to display FullScreen, which I can't find in version 5.

2) with CKEditor 5 I have problems with youtube videos. It has its own function, but it creates something with the "oembed" object. "oembed" is not you can display correctly in my HTML pages (I didn't understand why). So I wanted to load it via the old iframe method. I found this:

https://stackoverflow.com/questions/55632007/ckeditor5-angular-how-to-display-video-added-via-editor

According to the above-indicated link, it would be enough to pass them the configuration:

mediaEmbed: {
        previewsInData: true
    }

I tried every way to pass this configuration, I couldn't.

I would like it to be a standard WYSIWYG configuration, how can I set it up properly and elegantly?

I did all the installation as instructed on the site: https://editor.datatables.net/plug-ins/field-type/editor.ckeditor5

The plugin actually works, but I can't seem to customize it.

Can you guys help me with this?

Thank you

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    You can use the opts parameter for the field to pass configuration options to CKEditor.

    However, your questions appear to related to CKEditor 5's actual features. They should be directed to the CKEditor support channels as that is out of the scope of the support we provide.

    Allan

  • marianidiegomarianidiego Posts: 46Questions: 15Answers: 1

    I understand.... but passing parameters for each opts is tedious if it is called multiple times and in multiple parts of the program...

    I can't figure out exactly how CKEditor is loaded into the script: https://editor.datatables.net/plug-ins/download?q=field-type/editor.ckeditor5.js

    I think it's just much more elegant and efficient to insert that global config in that script. Have any of you ever done that?

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    If CKEditor has a global configuration (defaults), then whatever they are set to would be used by the Editor plug-in for it as well.

    Looking over the CKEditor 5 docs I'm not immediately seeing a way to do that!

    What you could do is take ckType.create( conf._input[0], conf.opts ) from the Editor integration plug-in and do:

    ckType.create( conf._input[0], $.extend({
      // ... default options
    }, conf.opts )
    

    to apply your own custom default options.

    It is something I could introduce to the plug-in by default perhaps, but I feel it would be better to have a default system in CKEditor (I suspect there must be one, I'm just not seeing it!).

    Regards,
    Allan

Sign In or Register to comment.