Is your feature request related to a problem? Please describe.
I'd like to use autocomplete in a textarea to implement a simple formula language (think, something like excel formulas). I believe I can use a custom query to extract just the relevant bit of the input string and a data.src function to tailor the response to the current context, but as far as I can tell, autocomplete always replace the entire input with the selected match.
Thoroughly Describe the solution you'd like
I'd like to be able to configure what portion of the target textarea is replaced with a selected match.
Please provide a few use cases for this feature
This would be useful in any use case where autocomplete is being used in a larger input context, such as formula entry, code entry, etc. As I'm working with a custom DSL, there's no language-specific parser already available.
Please Describe alternatives you've considered
As I'm just evaluating options, I've only read the docs and played with the codepen so far.
Somehow the first time through the codepen I completely missed the selection event handler which is updating the input; I can see now exactly how to do what i need to do. Closing, and thanks!
Is your feature request related to a problem? Please describe. I'd like to use autocomplete in a textarea to implement a simple formula language (think, something like excel formulas). I believe I can use a custom
query
to extract just the relevant bit of the input string and adata.src
function to tailor the response to the current context, but as far as I can tell, autocomplete always replace the entire input with the selected match.Thoroughly Describe the solution you'd like I'd like to be able to configure what portion of the target textarea is replaced with a selected match.
Please provide a few use cases for this feature This would be useful in any use case where autocomplete is being used in a larger input context, such as formula entry, code entry, etc. As I'm working with a custom DSL, there's no language-specific parser already available.
Please Describe alternatives you've considered As I'm just evaluating options, I've only read the docs and played with the codepen so far.