I have produced my very own wordpress plugin for WordPress, but it is not completely functional. Let me add one more button towards the Publish Editor that enables you to definitely place a picture (that you simply upload out of your computer, and instantly will get modified after upload) in to the publish.

Whenever you click the button, my popup which i produced during my wordpress plugin turns up. I feel the upload process and also the image is submitted and modified. Now, how do you place the look in to the publish?

This really is my code to date:

function insertHeader(imageURL){
    text = '<div style="text-align:center;"><img src="'+imageURL+'"/></div>';
    tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, text);

But clearly it does not work. I can not appear to locate a good tutorial that demonstrates how. I have got this far simply by searching at other plug ins.

try getting idea in the media-upload.php and upload.php of wordpress-admin