Open sreeraj-nyros opened 8 years ago
Up!
I found the solution.
Just put this gem helper methods in messages controller. http://textup.fr/184548YN
Has you can see i use method 'content_with_emoji(message.content)' in create method. And under private, all method are in gem helper... Just copy past all method under private except first ('message_params'), it's my params method.
if you want only gem helper: http://textup.fr/184541W8 But you have to patch line 68 (url = image_tag("emoji/#{img[:name]}.png")[/img.?src="(.?)"/i, 1]) to (url = ActionController::Base.helpers.image_tag("emoji/#{img[:name]}.png")[/img.?src="(.?)"/i, 1])) Sorry for my english.
run this script on page loaded with ajax.
$(function () { window.emojiPicker = new EmojiPicker({ emojiable_selector: '[data-emojiable=true]', assetsPath: '/assets/emoji_picker', popupButtonClasses: 'fa fa-smile-o', }); window.emojiPicker.discover(); });
@ID25 ,
I was working with ajax forms. emoji picker is not available when the form is loaded on ajax call but working fine when form is loaded with the page.
Could you help me on this?