I have a text area and list box with some values. When user places the cursor anywhere inside the text area and select the value from list box it should be injected in the specific position where the cursor placed .
I have tried some solution, where the text is always appending at the end .Not able to append at the cursor position.
In wysihtml editor there is a command named insertHTML that shoult do exactly that: inject whatever code you like at cursor position/selection (https://github.com/Voog/wysihtml/wiki/Supported-Commands#inserthtml-):
If your toolbar looses focus on editable area (like select dropdown might do or input), you have to save selection on toolbar opening and restore selection before executing command with
and
Like here is done: https://github.com/Voog/wysihtml/blob/master/examples/wotoolbar.html#L351