Problem/Motivation

We are not planning to promote the use of https://www.drupal.org/project/ckeditor_layouts yet, because it is not managing layout options (so component props), only layout regions (so component slots) yet: #3225378: Capture all settings used by layouts And we are planning to have our own submodule targeting ckeditor5.

But its is totally broken with the components we are generating through ComponentLayout and that can tell us something interesting about our implementation.

Proposed resolution

Our components must work everywhere a layout plugin is expected, so check what is wrong here.

See also: #3473855: [2.0.0-beta5] Test ComponentLayout with layout_paragraphs

Comments

pdureau created an issue. See original summary.

pdureau’s picture

Title: [2.0.0-beta3] Test ComponentLayout with ckeditor_layouts » [2.0.0-beta4] Test ComponentLayout with ckeditor_layouts
pdureau’s picture

Assigned: Unassigned » g4mbini
pdureau’s picture

Title: [2.0.0-beta4] Test ComponentLayout with ckeditor_layouts » [2.0.0-beta5] Test ComponentLayout with ckeditor_layouts
pdureau’s picture

Component: Code » Miscellaneous
pdureau’s picture

Title: [2.0.0-beta5] Test ComponentLayout with ckeditor_layouts » [2.0.0-rc1] Test ComponentLayout with ckeditor_layouts
g4mbini’s picture

It seems to me that this module doesn't work with layout pluglins generated by UIP2.

I don't know if it's coming from the module or from UIP2. I find nothing in the logs ...

My steps:

  • Install & activate the module
  • Configure full_html text format with some plugin layouts (eg. card, button, grid1, grid2)
  • Go to article node/edit
  • Try to insert components in ckeditor5
  • Close to nothing shows up

When looking at the source in ckeditor (or inspect the node html markup), every insert try to add a component generates the same markup:

<div class="drupal-layout">
    &nbsp;
</div>

I did a video screenshot that I attach to this issue.

g4mbini’s picture

Status: Active » Needs review
Issue tags: +UI Suite Initiative
StatusFileSize
new12.09 MB
pdureau’s picture

Assigned: g4mbini » Unassigned
Status: Needs review » Fixed

It is because of ckeditor_layouts which is loading the layout through the theme manager but SDC is not passing through the theme manager.

      $template = ['#theme' => $layout->getThemeHook()];

https://git.drupalcode.org/project/ckeditor_layouts/-/blob/2.x/src/Plugi...

So, we don't do anything.

pdureau’s picture

Status: Fixed » Closed (fixed)

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