]> git.mxchange.org Git - friendica.git/blob - view/js/vanillaEmojiPicker/README.md
Remove DI dependency from Module\Contact\Profile
[friendica.git] / view / js / vanillaEmojiPicker / README.md
1 # FG Emoji Picker - Emoji picker created with vanilla javascript
2 This is the simplest to use emoji picker built with vanilla javascript.
3
4 ![](./screenshot.png "Vanilla Javascript Emoji Picker")
5
6 ## Benefits:
7
8 - It is only one .js file without css or other files
9 - There is no jQuery or other libraries
10 - Simplicity of usage
11 - Multiple textareas and triggers
12 - Draggable emoji picker container
13
14 ## Initialize
15
16 Initialze plugin with ```new EmojiPicker({});```
17
18 ## Options
19
20 - Trigger - must be an array of objects. Inside object there are two properties. First is selector, and second - **insertInto** method to define where emoji going to be inserted. If there are multiple 'textarea's - you can provide array of selectors as well. Watch example below.
21 - Close button - **closeButton** method can be true of false depending on whether you want close button on emoji picker or not.
22 - specialButtons - takes color code to change special (move and close) button colors.
23
24 ```
25 new EmojiPicker({
26     trigger: [
27         {
28             selector: '.first-btn',
29             insertInto: ['.one', '.two'] // If there is only one '.selector', than it can be used without array
30         },
31         {
32             selector: '.second-btn',
33             insertInto: '.two'
34         }
35     ],
36     closeButton: true,
37     specialButtons: 'green' // #008000, rgba(0, 128, 0);
38 });
39 ```