Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For informational sake, TinyMCE uses a Ajax script from /wp-admin/admin-ajax.php to submit an action called send-attachment-to-editor. </p> <p>This function is inside of /wp-includes/js/media-editor.min.js</p> <pre><code>return wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:d,html:e,post_id:wp.media.view.settings.post.id}) </code></pre> <p>Basically once a image item is selected and after hitting the "insert to post" button, it runs the Ajax script and sends the action: send-attachment-to-editor and all the img attachment information including nonce.</p> <p>Example Ajax Post:</p> <pre><code>nonce=70b38cc7e2&amp;attachment%5Bid%5D=824&amp;attachment%5Bpost_content%5D=Specialized+S+Works+custom+work+by+Decal+Spec&amp;attachment%5Bpost_excerpt%5D=&amp;attachment%5Burl%5D=http%3A%2F%2Fdecal-spec.com%2Fwp-content%2Fuploads%2F2013%2F02%2FS-Works-5256.jpg&amp;attachment%5Balign%5D=none&amp;attachment%5Bimage-size%5D=large&amp;attachment%5Bimage_alt%5D=Specialized+S+Works+Project&amp;html=%3Ca+href%3D%22http%3A%2F%2Fdecal-spec.com%2Fwp-content%2Fuploads%2F2013%2F02%2FS-Works-5256.jpg%22%3E%3Cimg+src+width%3D%22625%22+height%3D%22942%22+alt%3D%22Specialized+S+Works+Project%22+class%3D%22wp-image-824+alignnone+size-large%22+%2F%3E%3C%2Fa%3E&amp;post_id=0&amp;action=send-attachment-to-editor </code></pre> <p>Which then this responds with the img you requested over and puts it inside the editor:</p> <pre><code>{"success":true,"data":"&lt;a href=\"http:\/\/decal-spec.com\/wp-content\/uploads\/2013\/02\/S-Works-5256.jpg\"&gt;&lt;img src=\"http:\/\/decal-spec.com\/wp-content\/uploads\/2013\/02\/S-Works-5256-679x1024.jpg\" alt=\"Specialized S Works Project\" width=\"625\" height=\"942\" class=\"alignnone size-large wp-image-824\" \/&gt;&lt;\/a&gt;"} </code></pre> <p>And for your second question I believe by default the content area ID would equal to <strong>#page_contents</strong> which you could manually add the content yourself through JS/JQuery.</p> <p>With all this the only concern I have is how are you going to show the contents of add media and the functionality of the upload/img managment. This particular section would need some permissions I believe and would cause it to have control over the pictures that are currently on the site already. I would be interested to see how you would handle the task of displaying this information and practical usage inside the comment section. </p> <p>I know this plugin is out of date and probably doesn't even work but it might help you <a href="http://wordpress.org/extend/plugins/tinymcecomments/" rel="nofollow">http://wordpress.org/extend/plugins/tinymcecomments/</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload