{"action":"created","issue":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/3221","repository_url":"https://api.github.com/repos/jupyterlab/jupyterlab","labels_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/3221/labels{/name}","comments_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/3221/comments","events_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/3221/events","html_url":"https://github.com/jupyterlab/jupyterlab/issues/3221","id":272745970,"number":3221,"title":"Consider adding UI for moving output from console to a markdown document","user":{"login":"akhmerov","id":2069677,"avatar_url":"https://avatars1.githubusercontent.com/u/2069677?v=4","gravatar_id":"","url":"https://api.github.com/users/akhmerov","html_url":"https://github.com/akhmerov","followers_url":"https://api.github.com/users/akhmerov/followers","following_url":"https://api.github.com/users/akhmerov/following{/other_user}","gists_url":"https://api.github.com/users/akhmerov/gists{/gist_id}","starred_url":"https://api.github.com/users/akhmerov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhmerov/subscriptions","organizations_url":"https://api.github.com/users/akhmerov/orgs","repos_url":"https://api.github.com/users/akhmerov/repos","events_url":"https://api.github.com/users/akhmerov/events{/privacy}","received_events_url":"https://api.github.com/users/akhmerov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-11-09T22:19:18Z","updated_at":"2017-11-12T18:45:11Z","closed_at":null,"author_association":"MEMBER","body":"This is merely a suggestion that I thought could be neat, while playing with the combination of a markdown document with an associated console.\r\n\r\nIt is very easy to send code to the console, however it requires much more work to return the output from console to the markdown document. Right now the user can apply the workflow illustrated below:\r\n\r\n![image](https://user-images.githubusercontent.com/2069677/32631502-c535a1c8-c5a0-11e7-9968-0711f7180ec3.png)\r\n\r\nThis, however wouldn't work with text, and images themselves are not updated due to browser caching. I believe it would be neat if it was possible to automatically (or upon user pressing a keyboard shortcut) to bring the output of the evaluated expression back to the markdown document."},"comment":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/comments/343757930","html_url":"https://github.com/jupyterlab/jupyterlab/issues/3221#issuecomment-343757930","issue_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/3221","id":343757930,"user":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars0.githubusercontent.com/u/836375?v=4","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"created_at":"2017-11-12T18:45:11Z","updated_at":"2017-11-12T18:45:11Z","author_association":"MEMBER","body":"One idea we could do some exploring with is the `<object>` tag (note: we probably need to safelist certain types, block others). By default, with types like `json`, it will embed it as a raw document fragment:\r\n\r\n![screen shot 2017-11-12 at 10 34 06 am](https://user-images.githubusercontent.com/836375/32702020-0c94bc02-c795-11e7-9945-2a127a656f31.png)\r\n\r\nAs an aside, this also works with `embed` but only `object` is supported well across the browsers:\r\n\r\n![screen shot 2017-11-12 at 10 29 03 am](https://user-images.githubusercontent.com/836375/32701987-5acd8fd0-c794-11e7-8926-6ebe246cdcdc.png)\r\n\r\nBasically I'm saying that we _could_ embed outputs into a markdown document in a way that would be invalid, though I'm guessing the document itself would be somewhat awkward:\r\n\r\n````markdown\r\nThis is my _example_ document. \r\n\r\n```\r\nfrom IPython.display import JSON\r\ndisplay(JSON({'a': 3})\r\n```\r\n<!-- if small enough, handle it raw (should base64 encode it) -->\r\n<object type=\"application/json\" data=\"data:,{'a': 3}\" />\r\n<!-- if large enough --> \r\n<object type=\"application/json\" data=\"outputs/17950c3f.json\" />\r\n````\r\n\r\nWe can't override what renders these objects, though we can certainly pick up when they're in the document and replace them with our richer versions."}}
{"actor":{"display_login":"rgbkrk"}}