-
Notifications
You must be signed in to change notification settings - Fork 26
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
Executable via "onclick"? #21
Comments
Hello.. you can create .js file. import it in to your project and inside js file put following inside "selector" add class/id of the button from which will invoke emoji picker |
My problem is that I have got a handful of textareas on the page that I have to address via their id. The id values are always different. So the best would be to execute the picker via some Also I have got another problem. Currently I'm using a class name. But The class is assigned after the page loaded (when a user clicks on "comment"). This means that the picker doesn't find the class and thus cannot execute the trigger. This is why we had to tweak the code a little bit: https://github.com/friendica/friendica/blob/develop/view/js/vanillaEmojiPicker/vanillaEmojiPicker.js#L7716 |
I was facing the same issue in my project. If you know you are only going to have so many pairs of emoji pickers and textareas, you can set up the triggers when initializing EmojiPicker and they will trigger even if you add those elements later.
|
At first thanks a lot for this slim piece of code!
From what I have seen, the only way invoking it, is to execute it indirectly via some trigger. I would like to use the code in Friendica for the comment fields. But to make that work, the script needs to be executed via the "onclick" attribute.
Is this prepared in any way? I'm a JS rookie, so it could be that the question is really stupid :-)
The text was updated successfully, but these errors were encountered: