How to prevent WP adding extra line after inserting/replacing text from TinyMCE popup?
===

I'm building a WP plugin that has a shortcode admin in a TinyMCE popoup. Whenever I'm done it inserts everything properly but it also adds a new line every time.

My script is very similar to this: http://pastebin.com/RVXfrQL9

`tinyMCEPopup.execCommand('mceReplaceContent', false, output);`