Topic: Write a small plugin for pick values from list and insert in textarea

Lets said I have this piece of drop down list:


I want to write a plugin or something that allow me:

  • Display that list as a button dropdown on the toolbar

  • When I choose any of the items from that dropdown insert the value/content at the same place where cursor is under the textarea

Can any give me some ideas? Some docs to read on? I am complete new to this