-
-
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
Adding styling to a mention built with MentionCustomization adds the style tags in the wrong place #6587
Comments
Hi! Thanks for the report, I can reproduce the issue. After loading the content with a styled customized mention, the marker is lost. Steps to reproduce:
I've noticed also another behaviour - styles applies to the whole marker regardless of the selection. If you'll style only one character, the whole marker becomes styled. |
@jodator, AFAICS |
Yep. Confirmed - we should use it also in the docs and manual tests. |
@Mgsy I like this particular behaviour. It's what I was expecting to happen as a user. |
Thanks for looking in to the issue everyone. |
@adampal yes you need to change attribute element priority. This is a default mention downcast:
|
📝 Provide detailed reproduction steps (if any)
The bug occurs any time when you use the mention feature with the MentionCustomization function.
You can see the bug in action in the ckeditor docs page on the example here:
In that demo,
✔️ Expected result
What is the expected result of the above steps?
The expected result is that the
<strong>
tags should be added outside of the<span>
that creates the mention.Eg
<strong><span>my mention</span></strong>
This works correctly when you do the same actions with the demo at the top of the page here
❌ Actual result
What is the actual result of the above steps?
What actually happens is that the
<strong>
tag is inside the<span>
tagEg
<span><strong>my mention</strong></span>
This creates an issue when pulling data back from a database to re-render the mention. It seems like because the contents of the
<span>
tag don't match up with what is expected, it gets flagged as a partial mention and the mention span is not rendered.I'm thinking maybe here in the source code is where the issue happens.
📃 Other details
EssentialsPlugin,
UploadAdapterPlugin,
AutoformatPlugin,
BoldPlugin,
ItalicPlugin,
Underline,
BlockQuotePlugin,
EasyImagePlugin,
HeadingPlugin,
ImagePlugin,
ImageCaptionPlugin,
ImageStylePlugin,
ImageToolbarPlugin,
ImageUploadPlugin,
LinkPlugin,
ListPlugin,
ParagraphPlugin,
Mention,
MentionCustomization,
Table,
TableToolbar,
TableProperties,
TableCellProperties,
Indent,
IndentBlock,
RemoveFormat,
Font,
Highlight,
HorizontalLine,
PasteFromOffice,
Alignment,
PageBreak,
Subscript,
Superscript,
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: