This CKEditor5 in Drupal core meeting is held biweekly in drupal.slack.com in the #ckeditor5 channel.

0️⃣ After a break, we will be starting up the CKEditor5 in Drupal meetings again, for now keeping them bi-weekly at this time on Thursdays.please say hi if you're around (include your d.o for issue credit)!Please feel free to post in these threads or start your own

lauriii Hey :wave:
Gábor Hojtsy (he/him) hey
hansa11 Hello :wave:
Piotr Koszuliński hello (270 kB)https://media0.giphy.com/media/bcKmIWkUMCjVm/giphy.gif?cid=6104955ee99a8... using /giphy

1️⃣ Project path to core

zrpnr Currently the code is all in an issue fork at [#2966864]There was some feedback at the BoF in Drupalcon Europe that this isn't a particular easy format to collaborate on,and the size of the eventual PR and complexity means it will need to be fully working and well tested before it could be merged even as an alpha experimental module.There was discussion about moving this code to a contrib module for now, so that it could take a path similar to JSON:API or Claro.I reached out to @Taran2L about continuing development at https://www.drupal.org/project/ckeditor5 and he agreed, does this seem like a good plan?
lauriii That seems like a way to make collaboration a bit easier
Gábor Hojtsy (he/him) I think it sounds like a good plan. it worked for json:api, Claro, Olivero, etc.
Gábor Hojtsy (he/him) also if it has an alpha in contrib or even a dev, people can already try it out with composer rather than a core patch, assuming a core patch is not needed
zrpnr the current patch has a plugin in media_library, just like CK4 does now in core. In the contrib module - should I just make a submodule for media_library integration?
lauriii I don’t have strong opinion on whether it should be in separate module or not. I think for users, it could be more intuitive to have it part of the same module. However, then we might have to create module for demonstrating the plugins separately
zrpnr oh that's a good point, I could just enable the plugin if media_library is enabled. To demonstrate a plugin I could add something separate like adding a link attribute or something less complicated.
Gábor Hojtsy (he/him) Good idea!

2️⃣ Modifying CKEditor5 with DLL

zrpnr An instance of CKEditor5 needs to be "built" with javascript tooling. If you want a specific plugin you'd need to import that js and rebuild again.There is some discussion in Drupal about modernizing js build process, but it could be complicated to allow a contrib module to add its own CK5 plugin for example.The CK team is working on a plan using webpack DLL, and they are almost finished.https://github.com/ckeditor/ckeditor5/pull/8614With this change, you can assemble a build from several "pre-built" files which can be included with a script tag for example.This would mesh much more similarly to how CK4 plugins can be loaded.
lauriii Have you had a chance to test the PR already?
zrpnr yes it seems promising, you'd add all the plugins as separate scripts, but then the instantiation of CKeditor works the same. It's not as tidy as a single compiled file but it does seem like it will make extending the build easier. I am still experimenting though, I haven't tested it with adding a custom module yet

3️⃣ Arbitrary "free" html

zrpnr The CK team is working on this since it is a potential problem for any sites (not just Drupal) migrating content from a CK4 to CK5 install. We should have some more information about these updates in February.In the meantime, @timplunkett (he/him) is going to look into some ways to mitigate this issue on the Drupal side.
lauriii I guess what needs to be figured out on our side is when we migrate content and how, as well as how to make all that safe from data loss. For example, someone could have text formats with both, CKE4 and CKE5 meaning that in theory someone could also go back to CKE 4 from CKE 5
zrpnr would it be a problem going back to 4 from 5? seems like the data loss only would happen when an arbitrary blob of html is converted to the CK5 model.
lauriii They could go back to CKE 4 and add more arbitrary markup meaning that the migration needs to run again if they want to use CKE 5 without losing markup
zrpnr and do that on node save- like a validation step almost
lauriii Yeah, it would mean that it happens on the form submission or immediately after the text format gets changed using AJAX

4️⃣ Media Embed

zrpnr Piotr posted a super helpful guide in this channel for displaying embedded media. In Drupal, the media preview is a separate request to get the rendered html. That html needs to live in a "non editable" area in CKEditor.This is now implemented in the prototype and could use some testing and review :slightly_smiling_face:

5️⃣ Editor plugin and button selection UI

zrpnr CKEditor4 has a custom "builder" so you can add or sort the buttons on the editor UI. In CK5 this will be a bit more complex, since available buttons depend on which CK5 plugins are added.The CK4 UI is built with backbone, but there's an issue in core to remove backbone [#3145958]Any thoughts about how the new UI should be built?I roughed up a very quick prototype using Vue, it seemed to be much more straightforward to start with.https://codepen.io/zrpnr/full/PoGGZoR
lauriii I’m wondering if we should go with vanilla JS until we have a decision on whether we want to replace Backbone with another library or with vanilla JS
zrpnr that's probably right to start with, I know that was the feedback on some of the other discussions about backbone. The editor UI seemed complicated enough that it would benefit from a framework but getting Vue in core is a whole separate question :slightly_smiling_face:
lauriii +1 that there could be benefits in using a framework but it could get us into a lengthy discussion :smile:

Participants:

lauriii, Gábor Hojtsy, hansa11, Piotr Koszuliński, zrpnr

Comments

zrpnr created an issue. See original summary.

tim.plunkett’s picture

Adding credit

tim.plunkett’s picture

tim.plunkett’s picture

tim.plunkett’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tim.plunkett’s picture