Tips on creating a custom autocomplete system


#1

New to Discourse and would like to develop a plugin.

I would like to create a plugin that can do autocomplete search in the input area which will query a json end point of a website I own and display the results and user is able to select using keyboard (like mention or emoji feature)

Can I know if this is feasible via plugin and any code that I can use as reference?

Thanks in advance :wink:


(cpradio) #2

The ReplyGif plugin has an autocomplete box for choosing its filter options.

The Discourse Tagging plugin does too.


#3

The examples you recommended will be helpful!

My use case will be much closer to user mention/emoji feature though, as I will be detecting a special character(for example ‘$’) as user types in the reply form and prompts user with a dropdown of selection.

Would there be any examples closer to what I need or I should be looking at how mention feature is implemented which I believe is located at discourse/jsapp

Thank you!


(Admir Hodzic) #4

here is my version of story,
Unfortunately I newer did it
Lack of knowledge of ruby an js left me in dark
Ill like to help in any way to accomplish this

https://meta.discourse.org/t/add-custom-autocomplete-lists-strings-to-posts/19469?source_topic_id=36478