emoji-picker icon indicating copy to clipboard operation
emoji-picker copied to clipboard

im trying to use the plugin on my angular2 project, after following the installation procedures it didint display the emoji button, but i receive this error in my console

Open ax3cubed opened this issue 7 years ago • 4 comments

jQuery.Deferred exception: Cannot set property 'iconSize' of undefined TypeError: Cannot set property 'iconSize' of undefined at new EmojiPicker (http://localhost:3000/assets/lib/js/emoji-picker.js:8:28)

ax3cubed avatar Jun 19 '17 13:06 ax3cubed

I got the same time of issue when implementing in project screenshot from 2017-06-27 16-54-25

Please help as soon as possible

aman-raikwar avatar Jun 27 '17 11:06 aman-raikwar

wow, i just figured out how to fix this. first of all i removed all the emoji javascript files and made sure i have just a single jquery script(having more could cause an error) which i placed in my index.html , then i placed them all accordinly in my component like so..
importing onInit and declare var $:any

then initialise the onInit ` ngOnInit() {

    $.getScript('../../../assets/lib/js/config.js');
    $.getScript('../../../assets/lib/js/util.js');
    $.getScript('../../../assets/lib/js/jquery.emojiarea.js');
    $.getScript('../../../assets/lib/js/emoji-picker.js');
    $.getScript('../../../assets/lib/js/activate.js');
}`

and it worked perfectly... hope this helps

ax3cubed avatar Jul 07 '17 14:07 ax3cubed

If you use "var $j = jQuery.noConflict();", you have to change $. and $( with $j. and $j(

EFvS avatar Nov 22 '17 13:11 EFvS

Simply you can just add in 'angular-cli' "assets/lib/js/emoji-picker.js", "assets/lib/js/config.js", "assets/lib/js/util.js", "assets/lib/js/jquery.emojiarea.js" then restart the server.

zamananjum0 avatar Jan 18 '18 06:01 zamananjum0