Skip to content

emoji autocomplet/suggestion #294

@ghost

Description

I've been trying to find out how to pop up emoji suggestions as for @mention but without success.

After some tries I am back to this:
my helper:
def markdownify(content)
pipeline_context = {gfm: true, asset_root: "https://a248.e.akamai.net/assets.github.com/images/icons"}
pipeline = HTML::Pipeline.new [
HTML::Pipeline::MarkdownFilter,
HTML::Pipeline::SanitizationFilter,
HTML::Pipeline::EmojiFilter,
], pipeline_context
pipeline.call(content)[:output].to_s
end

my js:
$(document).on('turbolinks:load', function(){
return $('[data-behavior="autocomplete"]').atwho({
at: "@",
'data': "/users.json"
});
});

gems:
gem 'jquery-atwho-rails', '> 1.3', '>= 1.3.2'
gem 'html-pipeline', '
> 2.7', '>= 2.7.1'
gem 'github-markdown', '> 0.6.9'
gem 'gemoji', '
> 3.0'
gem 'commonmarker'
gem 'sanitize', '~> 4.6', '>= 4.6.4'

Did someone find how to do this?


extra info: I am trying to get exactly the same as in here: http://ichord.github.io/At.js/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions