Closed marcocanderle closed 8 years ago
Hi! The asset_root is the base url to link emoji sprite, not related to Sprockets.
So you need to change your html-pipeline code:
def filtered_content
pipeline = HTML::Pipeline.new [
HTML::Pipeline::PlainTextInputFilter,
HTML::Pipeline::MarkdownFilter,
HTML::Pipeline::SanitizationFilter,
HTML::Pipeline::AutolinkFilter,
HTML::Pipeline::EmojiFilter
], { asset_root: "the url of your assets" } # <------
# E.g. GitHub uses this: "https://assets-cdn.github.com/images/icons/emoji/unicode"
pipeline.call(content)[:output].to_s
end
Hope this helps! 😊
That's exactly what I was looking for! Thanks a lot @JuanitoFatas
Perhaps that exact example could be on the readme file?
Thanks a lot for your help and for this gem!
Hi,
I'm with a Rails 5 application and adding html_pipeline gem with the EmojiFilter extension so that I can process the text sent by the users and filter the emojies.
I have the following:
I followed the usual steps adding the gemoji gem so that I can use the EmojiFilter, but when I add it to the pipeline declaration and try to use the pipeline I get the error:
I added this on my assets.rb initializer:
And also ran "rake emoji" but the error is still there.
Any ideas of I could solve this?
Thanks! Marco