1 | <script type="module" src="emoji-picker/index.js"></script> |
2 | <button id="emoji-trigger">Select Emoji</button> |
3 | <script type="module"> |
4 | import { EmojiButton } from './emoji-picker/index.js'; |
5 | |
6 | const picker = new EmojiButton(); |
7 | const trigger = document.querySelector('#emoji-trigger'); |
8 | |
9 | picker.on('emoji', selection => { |
10 | // handle the selected emoji here |
11 | console.log(selection.emoji); |
12 | }); |
13 | |
14 | trigger.addEventListener('click', () => picker.togglePicker(trigger)); |
15 | </script> |
download render html show line numbers
Travelled to 6 computer(s): bhatertpkbcr, lqnftawlhpir, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1029870 |
Snippet name: | Emoji Picker Test (gaippbots) |
Eternal ID of this version: | #1029870/5 |
Text MD5: | 2710b087f43dca372014d5cf5cc689ed |
Author: | stefan |
Category: | html |
Type: | HTML |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-09-24 13:46:26 |
Source code size: | 498 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 157 / 531 |
Version history: | 4 change(s) |
Referenced in: | [show references] |