StevenDevooght / tinyMCE-mention

Mention/Autocomplete plugin for tinyMCE WYSIWYG editor.
http://stevendevooght.github.io/tinyMCE-mention/
220 stars 95 forks source link

How to get select event ? #29

Closed pkgoyal86 closed 8 years ago

pkgoyal86 commented 8 years ago

How can I get select event when any value on suggestion is clicked, I want to save id of users in a hidden textfield to send notification.

StevenDevooght commented 8 years ago

A selected or removed event is not available in this plugin.

You can however override the insert function:

insert: function(item) {
    return '<a class="user-mention" href="/profile/' + item.userId + '">' + item.name + '</a>';
}

On the server you can parse the incoming html and pull out all user-mention links.

pkgoyal86 commented 8 years ago

Thanks :)

pkgoyal86 commented 8 years ago

Hi Steven,

Thanks for this outstanding plugin. I am using it in my webapplication.

I want a little favor from you. How can I use it on simple textarea. Do you have another plugin for simple textarea ?

If you have please suggest.

Thanks Again.

PK

On Fri, Jan 22, 2016 at 1:35 PM, Steven Devooght notifications@github.com wrote:

A selected or removed event is not available in this plugin.

You can however override the insert function:

insert: function(item) { return '' + item.name + ''; }

On the server you can parse the incoming html and pull out all user-mention links.

— Reply to this email directly or view it on GitHub https://github.com/CogniStreamer/tinyMCE-mention/issues/29#issuecomment-173838743 .