- Issue created by @sascha_meissner
- Status changed to Postponed: needs info
over 1 year ago 11:55am 26 July 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Which version of Drupal core are you using?
https://github.com/ckeditor/ckeditor5/issues/11709 was fixed upstream and shipped with Drupal 10.1.0 โ see #3326261-37: [upstream] [Style] Add tests for inability to apply styles to
,- ,
- ๐ฉ๐ชGermany sascha_meissner Planet earth
Hey Wim,
Thanks for your reply, unfortunatly Iยดm having this issue with 10.1.1we actually also had the issue you linked (styles were not available for
<ul>ยดs
) which was fixed by using drupal core 10.1.1 e.g Ckeditor5 38.
The issue described here is a little different, the "button-style" is available when an anchor is selected, but there is no way to exit it. Iยดm not sure if this is a bug in the ckeditor library or the "styles-core-implementation", but it should be easy reproduceable like i described. - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
The issue described here is a little different, the "button-style" is available when an anchor is selected, but there is no way to exit it.
By "exit it", do you mean removing it?
Perhaps a short video or animated GIF demonstrating the problem would be helpful?
- ๐ฉ๐ชGermany sascha_meissner Planet earth
Hey, i uploaded a video showcasing the bug,
in ckeditor4 when you pressed "return" it would leave the anchor and the style is not apllied anymore, now when pressing return it will keep the style applied but the style itself in the styles-dropdown itself is greyed out, so there is no way to continue writing without the style ... hope i described that clear now :-)
I made some further work and figured out that it is a bug in ckeditor5, i made a custom ckeditor build with the "Styles-Plugin" and have the following code (completely without drupal) with the same behaviour:
<body> <div id="editor"> </div> <script src="/ckeditor/ckeditor.js"></script> <script> ClassicEditor .create( document.querySelector( '#editor' ), { toolbar: { items: [ 'style', 'link' ], }, style: { definitions: [ { name: 'Button', element: 'a', classes: [ 'button' ] } ] } } ) .then( editor => { window.editor = editor; } ) .catch( err => { console.error( err.stack ); } ); </script> </body>
What would be your preferred way to continue this, would you create an issue on ckeditor on this?
- ๐ฉ๐ชGermany sascha_meissner Planet earth
FYI: I just created this issue on ckeditor5 jithub
- Status changed to Postponed
over 1 year ago 9:45am 8 August 2023 - ๐ฉ๐ชGermany sascha_meissner Planet earth
Hey, so there is some activity on the jithub issue and they found an error in their schema but also Witoso said that with the Link Plugin it would work, so i dont know if this could also be fixed by utilizing this in core ... and iยดm not sure which status to set here, so iยดll set this to "postponed"
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
I asked for clarification over at https://github.com/ckeditor/ckeditor5/issues/14683#issuecomment-1669327007 too โ thanks for following up on this, @sascha_meissner! ๐๐ We'll figure this out together ๐
- ๐ฉ๐ชGermany sascha_meissner Planet earth
Thank you very much @wim-leers for adding some traction to this :)
However we needed to fix this urgently, so iยดm sharing this core-patch we use based on Witosos "workaround suggestion" from the github issue, maybe it helps someone who also cant wait until fixed upstream. - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
@sascha_meissner Is that enough to completely fix the problem, without side effects for other functionality?
I see you copied that from @witeksocha's comment at https://github.com/ckeditor/ckeditor5/issues/14683#issuecomment-1669410984. A work-around like this is totally reasonable to add to Drupal core, and then remove in the future ๐
Asked @witeksocha for confirmation at https://github.com/ckeditor/ckeditor5/issues/14683#issuecomment-1671212844.
- ๐ฉ๐ชGermany sascha_meissner Planet earth
@wim-leers For me it is working as intended, i didnt experience any sideeffects so far :)
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
๐
Left another comment upstream. Hopefully this will land soon.
For a one-liner upstream fix, we should not bother adding test coverage on our end. That would be disproportionate.
- ๐ฎ๐ฉIndonesia el7cosmos ๐ฎ๐ฉ GMT+7
apply the patch, but still have the problem when clicking outside the link
and also when backspace after hitting the enter button.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Thanks, @el7cosmos, for posting that upstream too! ๐
- ๐บ๐ธUnited States edmund.dunn Olympia, WA
This mostly works for us. Thank you and good work @sascha_meissner! It is definitely a big improvement on the previous. The style replicates on the same line but doesn't follow if you hit enter. This is workable until a permanent fix is in place!
- ๐ฉ๐ชGermany sascha_meissner Planet earth
Hey, itยดs been some time, i just wanted to add that i totally agree with el7cosmos and edmund.dunn. It is still not the _perfect_ behaviour but at least you (our customers) can use it and work with it (before working with it was impossible)
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
https://github.com/ckeditor/ckeditor5/issues/15051 was fixed upstream.
This will ship in CKEditor 5 40.2.0 per https://github.com/ckeditor/ckeditor5/issues/14724.
Monitor ๐ Update CKEditor 5 to 40.2.0 RTBC .
- Status changed to Needs review
about 1 year ago 7:56am 13 December 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Can somebody who has run into this please check out the MR at ๐ Update CKEditor 5 to 40.2.0 RTBC , or apply its patch, and verify that this has been fixed? ๐
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
๐ Update CKEditor 5 to 40.2.0 RTBC landed, so now you can just test
10.2.x
, or soon:10.2.0
! ๐ - ๐ณ๐ฑNetherlands spadxiii
v40.2.0 seems to have fixed the anchors-issue indeed!
I don't want to put it on RTBC just yet, as I manually patched our drupal site instead of using 10.2.x
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Thanks, that's an encouraging first check!
- ๐ฉ๐ชGermany sascha_meissner Planet earth
I just tested 10.2.x-dev and it is working/fixed as expected. Thank you very much ๐
- Status changed to RTBC
about 1 year ago 4:26pm 15 December 2023 - ๐บ๐ธUnited States smustgrave
Based on #27 believe this can be closed out.
- Status changed to Fixed
12 months ago 2:27pm 11 January 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Nobody has reported further problems, so marking this as fixed. Please reopen if this is still an issue.
Automatically closed - issue fixed for 2 weeks with no activity.
- ,
etc. in CKEditor 5 โ and allows applying it to all elements โ .
So โฆ I'm really hoping you're using Drupal 10.0.x โฆ ๐ค๐ค
Production build 0.71.5 2024