{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2541","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2541/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2541/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2541/events","html_url":"https://github.com/Automattic/wp-calypso/pull/2541","id":127289020,"number":2541,"title":"Media: Populate advanced editing with parsed media","user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.githubusercontent.com/u/1779930?v=3","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Editor","name":"Editor","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Media","name":"Media","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.githubusercontent.com/u/1779930?v=3","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-18T18:47:12Z","updated_at":"2016-01-27T05:06:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2541","html_url":"https://github.com/Automattic/wp-calypso/pull/2541","diff_url":"https://github.com/Automattic/wp-calypso/pull/2541.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/2541.patch"},"body":"Related: #307, #2085\r\n\r\nThis pull request seeks to further progress advanced image editing by parsing the selected media item and adding the necessary behavior to update markup in the post editor after the user has chosen to save their changes.\r\n\r\n![WIP](https://cloud.githubusercontent.com/assets/1779930/12399666/65be45c6-bde9-11e5-8de7-e76f73e7ed04.png)\r\n\r\n*This is very much a work-in-progress.* As of now, the only expected behaviors are:\r\n- A user can edit a selected image from the inline toolbar\r\n- A modal appears, displaying the media's ID and a save button\r\n- Upon clicking Save, the image is replaced with the text \"Updated\"\r\n\r\nNote that this feature is feature-flagged, and is only available in a development environment. You can/should verify that these options are unavailable in all other environments.\r\n\r\n__Implementation notes:__\r\n\r\nThe advanced media modal is no longer rendered by the `<PostEditor />` component, but instead by the `media/advanced` TinyMCE plugin. This is done so that the expected `insertMedia` prop handler can be passed to the modal which, when called, replaces the current selection with the passed markup.\r\n\r\n__Testing instructions:__\r\n\r\n1. Navigate to the [Calypso post editor](http://calypso.localhost:3000/post)\r\n2. Select a site, if prompted\r\n3. Insert an image into the post contents\r\n4. Select the image by clicking it\r\n5. Click Edit in the inline toolbar\r\n6. Note that a dialog is shown, containing the image's ID and a Save button\r\n7. Click Save\r\n8. Note that the modal is dismissed and that the image has been replaced in post contents with \"Updated\""},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/175400526","html_url":"https://github.com/Automattic/wp-calypso/pull/2541#issuecomment-175400526","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2541","id":175400526,"user":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T05:06:28Z","updated_at":"2016-01-27T05:06:28Z","body":"@aduth I hope you don't mind the hit-and-run here, but I saw your PR without any comments and poked my head in. didn't see any concerning issues with the code but I left a couple comments. thanks for the work - the media system is really great IMHO"}}