Commit Graph

6 Commits

Author SHA1 Message Date
Daryl Koopersmith 692d806fff BUTTON.
Add a "Beta Media" button to the post editor. Currently, it is only capable of inserting images. Other attachment types and galleries need not apply... yet.

* Added `wp.media.string.image( attachment, props )` for generating an image as a string from an attachment and relevant attachment display properties.
* Properly localized the gallery workflow.
* Added `Workflow.update()`, which closes the modal, triggers an `update` event, and resets the selection.
* Added `wp.mce.media` to manage the various media workflows for editors.

see #21813, #21814, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22036 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 04:09:43 +00:00
Daryl Koopersmith fd3a6616c0 Remove internal TinyMCE attributes when generating the HTML for attachment views.
Moves the HTML utility functions to the top of `mce-views.js`. Also adds `wp.mce.view.removeInternalAttrs( attrs )` and `wp.mce.view.attrs( content )`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22023 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 22:20:15 +00:00
Daryl Koopersmith 0dd940e0c1 First pass on TinyMCE attachment in-editor UI.
* Adds in-editor UI for image attachments. Most of this UI should be able to migrate to all images in a future commit.
* Removes the wpeditimage TinyMCE plugin from the default plugins array.
* Add `wp.media.fit`, a helper method to constrain dimensions based upon a maximum width and/or height.
* Add html attribute parsing and string generation utilities (currently stored in mce-views).
* Calling `remove` on a TinyMCE views now ensures that the the parent and references are removed as well.
* Fixes a bug where we weren't sending the full array of results to matches in wp.mce.view.

see #21390, #21812, #21813.



git-svn-id: https://develop.svn.wordpress.org/trunk@22012 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 14:12:54 +00:00
Daryl Koopersmith c133581a81 Add JavaScript methods for handling shortcodes.
Adds `wp.shortcode`, a set of methods used for parsing shortcodes out of content. Also adds a default set of shortcode properties to `wp.mce.view`.

fixes #21996, see #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22004 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 01:00:08 +00:00
Daryl Koopersmith 1032d728f9 Improve documentation for wp.mce.view.add(). Store view id in view options. see #21812.
git-svn-id: https://develop.svn.wordpress.org/trunk@21962 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 02:18:15 +00:00
Daryl Koopersmith 0a0732f9ab Makes custom TinyMCE views easier to implement.
For details and examples, see the ticket.

props azaozz, fixes #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@21961 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 00:13:18 +00:00