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

How to get a list of the mentioned users #730

Open
aqzbouhid opened this issue Dec 29, 2021 · 1 comment
Open

How to get a list of the mentioned users #730

aqzbouhid opened this issue Dec 29, 2021 · 1 comment

Comments

@aqzbouhid
Copy link

First and foremost, I understand there is a similiar question in #92. However, the solution proposed by @mrsweaters, although on paper makes a lot of sense, when it comes to working with my trix editor, it just doesnt cut.

This is what I used (based on his solution):

image

The result:

image

The issue I believe is that trix has an HTML Sanitizer, in which when Tribute tries to include any tag (span was the one I was going for) it applies the effect of the tag (if it is bold, or italic for example) and prints out just the string inside the editor.

I would love for the solution to actually work using contenteditable='false'. The best solution would be a not-editable @mention that if the user typed backspace it would delete the whole mention. However, my turnaround was to include the mentions as '<a>' tags and get the substrings between '@' and '</a>', but this method has some flaws.
Anyone had this issue and managed to fix it?

My turnaround:

image
image

@thewhaleiam
Copy link

Did you find a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants