Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2024 at 10:16 UTC
Updated:
10 Sep 2026 at 11:55 UTC
Jump to comment: Most recent
Comments
Comment #2
christian.wiedemann commentedMaybe we can use CKEDitor Block integration https://www.drupal.org/project/ckeditor_insert_blocks
Comment #3
just_like_good_vibeswe should test this :)
Comment #4
juc1 commentedBy the way this doc page https://www.drupal.org/docs/develop/theming-drupal/using-single-director... says:
So does that mean the doc is misinforming because UI Patterns does not work with CKEditor?
Comment #5
just_like_good_vibesHello juc1, thank you for this kind message ;)
we will soon propose a tiny update to this part of doc, if a small mistake has been made by someone.
we don’t want any misunderstanding, indeed ckeditor integration had been planned for 2.1, and not for 2.0.
Comment #6
juc1 commented@just_like_good_vibes ok merci.
Comment #7
pdureau commentedIt is like that since the first version of SDC documentation, nearly 2 years before the release of UI Patterns 2: https://www.drupal.org/node/3352957/revisions/13043240/view 🙃
The scope of the future 2.0 and 2.1 versions was far from being defined at this time. I will fix this.
Comment #8
just_like_good_vibeslet's go
Comment #9
yannickooHey @just_like_good_vibes! I would recommend to use the Embedded Content module and provide a way to provide plugin derivatives for all SDCs.
Here you can find an example implementation of an Embedded Content plugin.
Comment #10
just_like_good_vibesHello @yannickoo and thank you for the tip.
Indeed, we target something similar to what Embedded Content is doing, but first we are trying to have no contrib dependencies.
We will anyway discuss that potential dependency with others from the team.
We have already ckeditor5 implementations in ui_styles an ui_icon module, so we can add one here.
Comment #12
yannickooHello again 👋 I wanted to share the minimal plugin implementation based on Embedded Content module ➡️ #3549147: [2.1.0] Embedded Content plugin.
Even if we don't want to introduce new dependencies I think that can be helpful for people so they could already place components in CKEditor.
Comment #13
just_like_good_vibesi made some advanced on this. for the moment i am trying to make it work,without the context.
Comment #15
just_like_good_vibesit is work in progress, but i am approaching something :))
anybody wants to give a try?
Comment #16
just_like_good_vibesComment #19
sonfdAfter applying the patch, my CKEditor toolbar fails to load and I get a console error:
Drupal 11.3.5, UI Patterns 2.0.15
Comment #20
just_like_good_vibeshello, thank you @sonfd for testing the code in the MR.
we will get back to this old proposition and correct.
Comment #23
just_like_good_vibeshello there,
I managed to spend some time (finally!) on the ckeditor5 sub-module.
it looks great now, someone wants to test and review?
thank you in advance
Comment #24
just_like_good_vibescomment #19 from @sonfd : the problem is Fixed, thanks for the report. The plugin declared
WidgetToolbarRepositoryas a soft requirement, which only works on text formats where another plugin (image, media) loads it. The new MR carries it as a hard requirement.The new MR refreshed the existing work on a fresh 2.0. (replacing the previous MR !468).
- Insert, edit and delete component in ckeditor;
- the dialog opens a large window, showing the component form and the edited component.
- the entity of the edited text is injected in the context (youhou!)
- Kernel, Functional and Playwright tests.
We cannot configure yet which components may be embed in a given text format, that feature would need follow-up issue.
Comment #25
pdureau commentedSounds great. I will have a look.
Comment #26
pdureau commentedTested on local env. It is impressive:
Issues:
That's all for now
Comment #27
just_like_good_vibesThis recursion problem is wider than ckeditor5 integration. we will create a separate issue for that :)
Comment #28
pdureau commentedOK for me.
Do you want to fix the little
stylelintwarnings or are we good?Comment #30
just_like_good_vibes