emoji-picker
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
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)
I got the same time of issue when implementing in project
Please help as soon as possible
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
If you use "var $j = jQuery.noConflict();", you have to change $. and $( with $j. and $j(
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.