-
-
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
Postfixer should remove the whole mention when it's build from two+ text nodes #4622
Comments
I was thinking about such cases and forgot to create a follow-up for this. I wonder how mention should behave when someone would try to style the mention? Right now it allows to style part of a mention but shouldn't we disallow this? Enforce whole text node to be selected when applying attribute? |
It's tricky... The most problematic part is that in the output you'll get a split span, so processing such content would be hard. We've got two options:
The latter seems easier. Do we have some examples how others approached this? |
Quick check: Slack breaks mention into "partial match" mention: Github Twitter, Facebook - no styling no problem |
I'd go with an easier solution for now. Which, IMO, may be to remove the mention. But if extending the style is easy to implement as well, then I'm fine with it too. |
I agree, styling a part of the mention should remove that part from the mention. We can go with something more sophisticated in the future but for now, this will suffice. |
To be precise - it should remove whole mentino as we do not allow partial mentions in other cases (ie typing). |
Partial removal makes more sense IMO but I guess it's harder to implement, right? |
We agreed that mention is full ie |
Fix: Mention post-fixer now correctly handles partial mentions on insert, remove and paste. Closes #12. Closes #8.
The text was updated successfully, but these errors were encountered: