send_to_editor function
-
Hi,
I’m developing a plugin, and one part of the plugin will allow user to insert image from the media library using WordPress media-upload. I have been able to create one “choose image” field using<a class="thickbox" id="3" href="media-upload.php?type=image&TB_iframe=1&width=640&height=500&tab=gallery" title="Set Image">Choose Image</a> <p id="img1">Image Shown Here</p>and the function
function send_to_editor(h) { jQuery('#img1').html(h); tb_remove(); }The goal is to add a second ‘anchor’ which will output the image to a second ‘paragraph’, but I’m unable to find any resources nor ideas for this. I would appreciate it if someone could point me in the right direction.
Another part I wish to add is for the send_to_editor function to add the URL to a text input. The ‘anchor’ class is created with Javascript’s createElement function in a for loop if that helps. Thanks!
The topic ‘send_to_editor function’ is closed to new replies.