Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal 10 and CKEditor 5 issues/differences #181

Open
keelanfh opened this issue Jun 9, 2023 · 5 comments
Open

Drupal 10 and CKEditor 5 issues/differences #181

keelanfh opened this issue Jun 9, 2023 · 5 comments

Comments

@keelanfh
Copy link
Member

keelanfh commented Jun 9, 2023

Thought I'd do a bit of testing with CKEditor in our D10 branch.

A few things I observed:

Height of body field

The height of the body field (in Service pages, perhaps elsewhere too) is very small compared to in CKEditor 4. Actually smaller than the Summary field.

image

D9 for comparison:

image

Possible to e.g. set link styles on non-links

In D9 you cannot set link styles (external link, PDF link, Start button) on non-links. Similarly for some of the other styles ("Green ticks") which should only be set on certain elements. In D10 you can do this, which means you have something styled as an interactive element which actually isn't interactive.

Possible to set multiple styles on the same element

In D10 it is possible to set multiple conflicting styles on the same element, e.g. here is an item styled simultaneously as Callout primary, Callout teal and Callout carbon. It should only be possible to set one of these styles

image

Styles do not appear in WYSIWYG preview

In D9 there are some nice preview styles in the WYSIWYG to show what things will look like when you publish them. These are missing in D10:

image

D9 for comparison:

image

New "code" and "code block" styles have appeared

Unlikely to be useful for LGD, should probably be removed

image

@ekes
Copy link
Member

ekes commented Jun 9, 2023

Is that https://www.drupal.org/project/drupal/issues/3241295 fixed in 10.1.x or is the min max rows setting not there?

@keelanfh
Copy link
Member Author

keelanfh commented Jun 9, 2023

Is that https://www.drupal.org/project/drupal/issues/3241295 fixed in 10.1.x or is the min max rows setting not there?

I'll check. Looks like I was on 10.0.9.

@justinepocock
Copy link
Member

justinepocock commented Jun 21, 2023

The height of the body field can be fixed with css much easier in CK5 I've added to a ckeditor.css file

.ck-editor__editable {
  min-height: 200px;
} 

Styles do not appear in WYSIWYG preview - you need to make a stylesheet for the styles to appear and add the following code to the themes info.yml file. It might be as simple as adding the 5 to the line of code

ckeditor5-stylesheets: 
  - css/base/ckeditor.css 

I'll see if I can get some patches whipped up over the next few days for those, I'm following the chat in the Drupal #ckeditor5 slack channel closely, and work is progressing fast but not fast enough, especially around the setting styles on elements.

@keelanfh
Copy link
Member Author

Awesome!

@keelanfh
Copy link
Member Author

keelanfh commented Jul 4, 2023

For some progress on this one:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants