auto @mention user just like twitter has on its reply box. Is it possible?

Hawkee  -  Jul 22, 2013

Yes, you just pre-populate the hidden field with the userid in the format above and pre-populate the textarea with the visual representation of the mention.

tushar_vikky  -  Jul 22, 2013

I did that. But as soon as I select the textbox to type, it updates and copies the text to hidden_input.

Hawkee  -  Jul 22, 2013

Ah yes, because the id_map is not defined. You'll also need to pre-populate that as well.

tushar_vikky  -  Jul 22, 2013

It would help alot if you can point me to an example. And also how to define the id_map.

Hawkee  -  Jul 22, 2013

@tushar_vikky It is mentioned above. You'll just need to create a json encoded array with a single element representing the user you'd like pre-populated. If you need to see it in action try editing a comment you made here with a @mention and view the source for the id_map.

tushar_vikky  -  Jul 22, 2013

@Hawkee thanx a lot. It works perfect. :)

arimk  -  Feb 20, 2014

@Hawkee just to test the id_map as I have trouble using it
edit: got it to work now :)

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.