Map default suggestion items to a url instead
Jarvvski opened this issue · 2 comments
Jarvvski commented
I've been fiddling around in my fork to try and get this, but sadly the suggestions are very deeply imbedded in your code flow and I'm not that great with javascript.
Could we setup a way to define a JSON object where the key is followed by the string that matches the suggestion 'text'? And in turn, build a link based on the suggestion 'url'?
defaultSuggestions: {
'google':
{
text : 'mail',
url : 'https://gmail.com'
}
{
text : 'suggestion2'
url : 'https://suggestion55555.com'
}
}
I have some really long URL's that I'd like to hide behind the text, otherwise the screen gets very cramped...
xvvvyz commented
You can do this as is. Consider the following:
// command
[null, null, 'mail', 'https://gmail.com', null, null]
// default suggestion
'google': ['mail']
Jarvvski commented
Perfect!
Thanks