-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add style (Styles-Plugin) to anchor leads to unuseable behaviour #14683
Comments
The GHS has an invalid schema definition for
This line should not be here same as for the linkHref attribute. cc @Witoso
|
I wonder @sascha-meissner why don't you use Screen.Recording.2023-08-07.at.10.00.43.mov(@niegowski 's case is to fix anyway) |
@niegowski Thanks for your answer and @Witoso Thanks for your suggestion, My example code here was to break the error down to its root cause. Actually i´m using Ckeditor5 within Drupal10 (Drupal ships this with it´s core and has an own link-implementation which will supply an autocomplete to target content, and for this link-implementation the same error appears like described in my minimal code example) |
This seems like a similar behavior/bug to #14216, but based on #14683 (comment) by @niegowski, it sounds like it'll need to be fixed upstream anyway?
I'm confused by this statement 😅 @sascha-meissner is showing that he's using the What am I missing? 🙈 Upstream Drupal issue: https://www.drupal.org/project/drupal/issues/3376167 |
@sascha-meissner showed an example w/o *GHS is a dependency of Style. |
@Witoso. It's not that. The Link feature uses the |
Workaround: removing the flag from the schema after initialization:
|
@Witoso Is that enough to completely fix the problem, without side effects for other functionality? |
Attaching video of what happens after the workaround: Screen.Recording.2023-08-09.at.15.07.49.mov
No, it shouldn't affect other features unless someone created something that expects this is the way it works 🤔. But that would be an extremely rare case, I think. This is a bug, for sure. |
If it's really a one-liner to fix, can we please get this in the upcoming release? 🙏 |
apply the suggestion workaround, but still have the problem when clicking outside the link and also when backspace after hitting the enter button. Screen.Recording.2023-10-09.at.13.34.57.mov |
May be related: #15051. |
…o-unusable-behaviour Fix (html-support): Additional attributes for the link element (e.g. CSS class) should not be applied after pressing Enter. Closes #14683.
📝 Provide detailed reproduction steps (if any)
Make a ckeditor5 build with the Styles-plugin included
take this codesnippet
Now, add some text, select it and make a link out of it, now when selecting the link-text, the style "button" will get avaiblable in the styles-dropdown, select the style - Now see the "Actual result" part of this issue.
✔️ Expected result
When applying the "button-style" to an anchor, a hit on return should "leave the anchor and exit the style" (like in ckeditor4)
❌ Actual result
When applying the "button-style" to an anchor, there is no way to continue writing without the style, when hitting return, the style will further be applied but cannot be removed (the style in the styles button is greyed out, even though you see visually that it is applied).
❓ Possible solution
When hitting enter the style should not be further applied
📃 Other details
I really hope this is no duplicate, i can reproduce this with the latest 38.1 Version
The text was updated successfully, but these errors were encountered: