neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

Upgrade CKEditor5 to v35.1.0

Open paxuclus opened this issue 4 years ago • 2 comments

Description

Currently v16 is in use. As of creating this issue, https://github.com/ckeditor/ckeditor5/releases/tag/v23.1.0 is the latest release.

  • [ ] Check breaking changes
  • [ ] Decide on target version for neos-ui
  • [ ] Update
  • [ ] Test extensibility

paxuclus avatar Nov 17 '20 08:11 paxuclus

If nobody else wants to take care of this I might be able to work on this in december 🤞

paxuclus avatar Nov 17 '20 08:11 paxuclus

@nlx-lars You are welcome to provide a PR ❤️

markusguenther avatar Nov 17 '20 11:11 markusguenther

Was just reminded again that we neeeeeed to update ^^

Ckeditor is currently moving to typescript (instead of jsdocs) so we should definitely wait for 37 (maybe some breakiness will occur ^^)

i know that v22 is pretty breaky for external plugins as the upcast and downcast callback is slightly changed

currently v16

        conversion.for( 'downcast' ).elementToElement( {
            model: 'placeholder',
            view: ( modelItem, viewWriter ) => createPlaceholderView( modelItem, viewWriter );
        } );

starting with v22 see https://github.com/ckeditor/ckeditor5/releases/tag/v22.0.0

        conversion.for( 'downcast' ).elementToElement( {
            model: 'placeholder',
            view: ( modelItem, { writer: viewWriter } ) => createPlaceholderView( modelItem, viewWriter );
        } );

@reinmar wrote in slack

There were quite many releases since 16.0.0 so it’s not going to be automatic for sure. I also don’t know which parts of API you rely on so it’s hard for me to assess the size of the scope.

Some resources that may help are

  • the changelog (quite detailed): https://ckeditor.com/docs/ckeditor5/latest/updating/changelog.html
  • and starting from v25 we also begun writing migration guides: https://ckeditor.com/docs/ckeditor5/latest/updating/migration-to-35.html

In general, we didn’t have changes that would make migrating hard for a long long time. We regularly ship some smaller breaking changes, but always (at least for the last 2-3 years) with easy upgrade paths.

I think our biggest problem will be plugins (as how can we support two apis at the same time? Wed need to expose the currently used ckeditor version so people can based on their enviroment call the correct api. This is a bit cumbersome for plugin authors but the only way i see. It sure will be a breaking change so 9.0 it is.

Another funny thing to see will be wether our manual extracted css will hold up, or if we need the correct build setup: see

  • https://github.com/neos/neos-ui/blob/a0683ed157699042aa269ea0819977efafb5be46/packages/neos-ui-ckeditor5-bindings/src/EditorToolbar/TableStyles.vanilla-css

mhsdesign avatar Mar 22 '23 13:03 mhsdesign

also we can get rid of:

https://github.com/neos/neos-ui/blob/a0683ed157699042aa269ea0819977efafb5be46/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js#L7

and we should also try to fix: https://github.com/neos/neos-ui/issues/3223

mhsdesign avatar Mar 27 '23 09:03 mhsdesign