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

CKEditor 5 - Style definition for UL #14200

Closed
mhirdes opened this issue May 22, 2023 · 8 comments
Closed

CKEditor 5 - Style definition for UL #14200

mhirdes opened this issue May 22, 2023 · 8 comments
Labels
package:list resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@mhirdes
Copy link

mhirdes commented May 22, 2023

📝 Provide detailed reproduction steps (if any)

  1. Configure a style definition for an UL element
  2. Select the list in the editor.
  3. You can't select the style because it is disabled. May only the LI is selected.

✔️ Expected result

The style should be selectable as it was in CKEditor 4.

❌ Actual result

I can't select the style and also the already added classes were removed.

❓ Possible solution

Show the selected element below and may switch there the ul.

📃 Other details

  • Browser: Chrome 113
  • OS: Windows 11
  • First affected CKEditor version: 5
  • Installed CKEditor plugins: default

Also described here


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@mhirdes mhirdes added the type:bug This issue reports a buggy (incorrect) behavior. label May 22, 2023
@Witoso
Copy link
Member

Witoso commented May 22, 2023

This was fixed in today's release v38.0.0, and #11590.

@Witoso Witoso closed this as completed May 22, 2023
@Witoso Witoso added resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. package:list labels May 22, 2023
@mhirdes
Copy link
Author

mhirdes commented Jun 13, 2023

Sry, but also with version 38 the problem still exists

@mhirdes
Copy link
Author

mhirdes commented Jun 13, 2023

Or do I miss sth?

@mhirdes
Copy link
Author

mhirdes commented Jun 13, 2023

I can't reopen this issue

@Witoso
Copy link
Member

Witoso commented Jun 13, 2023

What is your lists configuration? We only implemented this change for the DocumentList plugin. It will not work for the standard List. List implements basic behaviors and more advanced ones are handled by the DocumentList.

@bmoex
Copy link

bmoex commented Jul 5, 2023

The feature should be also fixed in standard List as this is for the feature Style applied to block styles. For me as a confused user right now, it make no sense to only fix it in the DocumentList plugin as you might not use the fancy DocumentList.

For our usecase we use the regular bulletedList toolbar item in combination with the style plugin:

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        plugins: [ Style, /* ... */ ],
        toolbar: {
            items: [
                'style',
                // More toolbar items.
                // ...
            ],
        },
        style: {
             definitions: [
                {
                    name: '✓ Checkmarks',
                    element: 'ul',
                    classes: [ 'list-unordered-checkmarks' ]
                },
            ]
        }
    } )
    .then( /* ... */ )
    .catch( /* ... */ );

based on https://ckeditor.com/docs/ckeditor5/latest/features/style.html

@Witoso
Copy link
Member

Witoso commented Jul 7, 2023

@bmoex thanks for the feedback. The decision to only support it in one version was made in connection to the project we are just starting. We will replace the List implementation with the Document List (supporting simple markup as well). More info will follow soon.

@jsfgreen
Copy link

jsfgreen commented Jul 12, 2023

Just to support @mhirdes request, we also need the same functionality of adding styles to a <ul> or <ol> for that matter. Thanks!

reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this issue Aug 30, 2023
See: ckeditor/ckeditor5#14200 (comment)

This allows similar behaviour as CKEditor 4 with applying styles to block components as DocumentList is preferred over List.

Resolves: #100348
Releases: main, 12.4

Change-Id: I155889e37ca1e63b27aed0d01dad2154da5bd37e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79701
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Torben Hansen <derhansen@gmail.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Kub Zgi <jakzgi@wp.pl>
Reviewed-by: Torben Hansen <derhansen@gmail.com>
TYPO3IncTeam pushed a commit to TYPO3-CMS/rte_ckeditor that referenced this issue Aug 30, 2023
See: ckeditor/ckeditor5#14200 (comment)

This allows similar behaviour as CKEditor 4 with applying styles to block components as DocumentList is preferred over List.

Resolves: #100348
Releases: main, 12.4

Change-Id: I155889e37ca1e63b27aed0d01dad2154da5bd37e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79701
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Torben Hansen <derhansen@gmail.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Kub Zgi <jakzgi@wp.pl>
Reviewed-by: Torben Hansen <derhansen@gmail.com>
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this issue Aug 30, 2023
See: ckeditor/ckeditor5#14200 (comment)

This allows similar behaviour as CKEditor 4 with applying styles to block components as DocumentList is preferred over List.

Resolves: #100348
Releases: main, 12.4

Change-Id: I155889e37ca1e63b27aed0d01dad2154da5bd37e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80689
Tested-by: core-ci <typo3@b13.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
TYPO3IncTeam pushed a commit to TYPO3-CMS/rte_ckeditor that referenced this issue Aug 30, 2023
See: ckeditor/ckeditor5#14200 (comment)

This allows similar behaviour as CKEditor 4 with applying styles to block components as DocumentList is preferred over List.

Resolves: #100348
Releases: main, 12.4

Change-Id: I155889e37ca1e63b27aed0d01dad2154da5bd37e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80689
Tested-by: core-ci <typo3@b13.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

4 participants