I'm creating a shortcode generator the industry metabox underneath the text editor within the new publish page in wordpress admin area. My issue is which i want once the cursor is situated in the center of the written text within the tinymce editor and that i click my "add shortcode" button within the metabox, the shortcode to look within the text in which the cursor is. I looked with the hooks and that i don't find appropriate one. Also I do not believe it is the very best idea to include the shortcode with only javascript, because sometimes the written text can be quite complex and to be really difficult to find the best html tag to place it. You can as well produce some advise how to do this?

Solution: After more searching and reading through I discovered this web site publish http://xavisys.com/wordpress-25-shortcodes/