You can create a div containing the output and then adapt the size of the popup on the size of the div, but you still need a "starting" size. By the way the popup is re-sizable. I'll keep it as is, or at least moving the size inside a setting (where?).