I've added a shortcode button in the TinyMCE editor in the page/post pages that opens up a Thickbox form.
The button is working; it opens up the thickbox form like it should. However my stumbling point is getting the value BACK to the TinyMCE editor and closing the thickbox.
This is the code I'm using to display the button and opening Thickbox
title: 'Adds a loop of recent posts with specific parameters to the page.',
which calls this function
// echo the form
At the end of the form there will be a button that is supposed to take all the data and turn it into a shortcode.
My question is:
How do I get data from this thickbox upon a button press BACK to the TinyMCE editor and then close the thickbox?
I've done a lot of searching but I can't find proper documentation on Thickbox and can't find any on shortcodes and thickbox forms as well.
EDIT: I have tried using window.send_to_editor and tb_remove but I might have used these wrongly