StevenDevooght / tinyMCE-mention

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

Possible to have two properties to search in for queryBy? #53

Closed bkmorse closed 7 years ago

bkmorse commented 7 years ago

Source format:

source: [
    { name: 'Tyra Porcelli',  username: 'tyra102' }, 
    { name: 'Brigid Reddish', username: 'brigidx430' },
    { name: 'Ashely Buckler', username: 'sk8ergurl' },
    { name: 'Teddy Whelan', username: 'teddy123' }
]

Is it possible to allow for it to search in both the name and username of the source as seen above?

I tried: queryBy: 'name, username'and it does not seem like it supports it. Is there any chance it could support that? I would only need the name or username to be inserted after the user selected

StevenDevooght commented 7 years ago

You can use the source function and implement your own query logic.