wontlost-ltd / vaadin-litelement-ckeditor

Vaadin14+LitElement+CKEditor5
Other
17 stars 13 forks source link

Is this difference in the editor on ckeditor website even possible in the plugin? #42

Closed FollowSteph closed 1 year ago

FollowSteph commented 1 year ago

I just noticed today when trying to align an image that the popup menu was different on CKEditor's website and the plugin. Is this even something related to the plugin? Is it even possible to add this functionality? It's on an image within a table. It could be outside of the scope of the plugin but I'm asking because outside of editing the source it's hard to right/left align an image in a table cell as it always wants to go to center. Anyways just checking to see what's even possible.

Below are a couple of screenshots showing the plugin vs the editor on CKEditor's website, specifically this editor (the one with source): https://ckeditor.com/ckeditor-5/demo/html-support/

onlineEditor plugin

FollowSteph commented 1 year ago

Also what's weird is that the editor with source at: https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html shows a different popup menu for the image. Is this possibly something that is configurable that's just something the vaadin plugin doesn't support or is it something within CKEditor? And if it's something not yet implemented then do you think it is a smaller or bigger effort because it may be something I would consider sponsoring possibly depending on the details.

eroself commented 1 year ago

Try this code:

Config config = new Config();
config.setImage(new String[][]{},
       "", new String[]{"full", "alignLeft", "alignCenter", "alignRight"},
        new String[]{"imageTextAlternative", "|",
        "imageStyle:alignLeft",
        "imageStyle:full",
        "imageStyle:alignCenter",
        "imageStyle:alignRight"}, new String[]{});
eroself commented 1 year ago

For more about image style, please check this.

FollowSteph commented 1 year ago

Thank you. That helped a lot.