In my plugin, I would like to add two buttons to Media Manager (to the left of "Insert Into Post" in "media-toolbar-primary" section), and connect a jQuery action to it.
- First one - The "Select All" button shoud allow to select all availabe images (only images), depending on option value selected (eg. All Media Items, Uploaded to This post etc). So if "All Media Items" is selected - all images available will be selected, if "Uploaded to This post" is selected - only images attached to current post will be selected.
- Second one - "Custom Insert Into Post" - will get images data for all selected images (full size image source, alt text, size etc that are available) and while allowing to wrap them in aditional html code - return code to tinymce editor.
Returned code for second button could look this way:
<ul> <li><img src="full/path/to/001.jpg" alt="alt text 1" /></li> <li><img src="full/path/to/002.jpg" alt="alt text 2" /></li> <li><img src="full/path/to/003.jpg" alt="alt text 3" /></li> <li><img src="full/path/to/004.jpg" alt="alt text 4" /></li> <li><img src="full/path/to/005.jpg" alt="alt text 5" /></li> </ul>
As far as I understand, the only way is to use override appropriate Backbone view, but beside that, thats all I know for now.
Thanks for help.