This creates the working of shortcodes as in a meta box. But I have stripped the meta box thing and now I will try to work in the integrating the stuff with the popup window.