How to make a stand-alone button to the post edit view

First of all you need prevent whole post form sending. Try: function rt_custom_button(){ $html=”<div id=”major-publishing-actions” style=”overflow:hidden”>”; $html .= ‘<div id=”publishing-action”>’; $html .= ‘<button onclick=”send_note(event);” accesskey=”p” tabindex=”5″ class=”button-primary” id=”custom” name=””>send media note</button>’; $html .= ‘</div>’; $html .= ‘</div>’; echo $html; } add_action( ‘post_submitbox_misc_actions’, ‘rt_custom_button’ ); Then you need to add JS function somewhere: function send_note(event){ event.preventDefault(); … Read more

Show preview of post changes on page

It is HTML and Javascript territory. For the image preview, you may need a input type=”file” with accept=”image/*” and onchange event handler for the preview and the javascript getElementById to get the image id to display for preview. Have a look at these examples. For the text preview part here is a fiddle link. It … Read more