StevenDevooght / tinyMCE-mention

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

Various sources #28

Closed thibaultvanc closed 8 years ago

thibaultvanc commented 8 years ago

Is it possible to set various sources. For exemple, if I press # key I have a source1, if I press @ key, i have the source 2 ??

Thanks in advance

StevenDevooght commented 8 years ago

Hi,

If you configure the source parameter as a function you can use the delimiter parameter to differentiate sources.

thibaultvanc commented 8 years ago

Thank You Steven, I have just tried. Its working with @ but NOTwith # is it normal ?

StevenDevooght commented 8 years ago

@thibaultvanc, can you create a sample fiddle (http://fiddle.tinymce.com/) that demonstrates this behavior?

thibaultvanc commented 8 years ago

The mention pluggin is not attached to the fiddle, and I don't know how to do it ...

StevenDevooght commented 8 years ago

I created a fiddle a while ago. You can have a look here

thibaultvanc commented 8 years ago

Here : http://fiddle.tinymce.com/hmfaab/7

StevenDevooght commented 8 years ago

I forgot to mention, but the delimiters have to be configured too. See the updated sample

thibaultvanc commented 8 years ago

Ok Thanks but this one doesn't work ? ##

http://fiddle.tinymce.com/hmfaab/14

StevenDevooght commented 8 years ago

Currently only single character delimiters are supported... Also differentiating between '#' and '##' would not be possible.

thibaultvanc commented 8 years ago

ok thank You