I want to inject the dropdown selected value in jWYSIWYG at cursor pointer.I want to do is like that:
<select id="shirt" name="shirt">
<option value="small">Small</option>
<option value="medium">Medium</option>
<option value="large">Large</option>
</select>
<a href="#" id="btn_insert" name="btn_insert">Insert</a>
<textarea id="testing_txt" name="testing_txt"></textarea>
The trick is to get the cursor position reliably. I found how to do this from an existing SO thread. Once you have the cursor position it is just a matter of getting the before and after text, then inserting your new value in the middle.
http://jsfiddle.net/Vr99u/1/