{"action":"created","issue":{"url":"https://api.github.com/repos/goessner/mdmath/issues/15","repository_url":"https://api.github.com/repos/goessner/mdmath","labels_url":"https://api.github.com/repos/goessner/mdmath/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/goessner/mdmath/issues/15/comments","events_url":"https://api.github.com/repos/goessner/mdmath/issues/15/events","html_url":"https://github.com/goessner/mdmath/issues/15","id":214579271,"number":15,"title":"Extending VSCode's Builtin Markdown Preview","user":{"login":"mjbvz","id":12821956,"avatar_url":"https://avatars1.githubusercontent.com/u/12821956?v=3","gravatar_id":"","url":"https://api.github.com/users/mjbvz","html_url":"https://github.com/mjbvz","followers_url":"https://api.github.com/users/mjbvz/followers","following_url":"https://api.github.com/users/mjbvz/following{/other_user}","gists_url":"https://api.github.com/users/mjbvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mjbvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjbvz/subscriptions","organizations_url":"https://api.github.com/users/mjbvz/orgs","repos_url":"https://api.github.com/users/mjbvz/repos","events_url":"https://api.github.com/users/mjbvz/events{/privacy}","received_events_url":"https://api.github.com/users/mjbvz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-03-16T02:11:34Z","updated_at":"2017-05-30T20:13:00Z","closed_at":null,"body":"Hey, I work on VSCode and am investigating allowing extensions to extend VSCode's builtin markdown preview. One big use case for this is adding math support.\r\n\r\nYour extension already provides great support for markdown + math, so I wanted to reach out and see if you would be interested in exploring migrating to extend our builtin markdown preview instead of providing your own preview experience.\r\n\r\n## Why\r\nUsers like being able to customize their markdown previews using extensions, but currently, this requires that each markdown extension implement its own preview. This results in an inconsistent markdown experience and is not scalable.\r\n\r\nMore concretely, extensions that use a custom markdown preview miss out on features we add to the builtin markdown preview, such as scroll synchronization, and also have missed out on the important security fixes we recently made around the markdown preview.\r\n\r\n## How\r\nThe current proposal is to allow extensions to extend the built-in markdown preview. At a minimum, extensions would be able to register markdown-it plugins. Here's the current prototype of this: https://github.com/Microsoft/vscode/pull/22421 The `markdown-ext` extension included in the PR is for demonstration purposes only. It registers a markdown-it plugin that adds emoji support to our builtin markdown preview.\r\n\r\nTo support KaTeX, we will also have to support registering scripts and stylesheets to include in the preview as well.\r\n\r\nIf you were to move your extension to use the new plugin model, your extension would only be able to interact with the preview through these three extension points. At a minimum, this would require switching to use something like [`markdown-it-katex`](https://www.npmjs.com/package/markdown-it-katex).\r\n\r\n## Todo\r\nWhen you have a chance, let me know if this new extension point sounds like something you would be interested in exploring further. If so, take a look at the [current PR](https://github.com/Microsoft/vscode/pull/22421) and let me know if you have thoughts or concerns with where things stand. Specifically, I'd like to understand what APIs or features you'd need from our side to migrate your extension to this new model.\r\n\r\nThanks, and let me know if you have any questions.\r\n"},"comment":{"url":"https://api.github.com/repos/goessner/mdmath/issues/comments/304994257","html_url":"https://github.com/goessner/mdmath/issues/15#issuecomment-304994257","issue_url":"https://api.github.com/repos/goessner/mdmath/issues/15","id":304994257,"user":{"login":"goessner","id":4902746,"avatar_url":"https://avatars1.githubusercontent.com/u/4902746?v=3","gravatar_id":"","url":"https://api.github.com/users/goessner","html_url":"https://github.com/goessner","followers_url":"https://api.github.com/users/goessner/followers","following_url":"https://api.github.com/users/goessner/following{/other_user}","gists_url":"https://api.github.com/users/goessner/gists{/gist_id}","starred_url":"https://api.github.com/users/goessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goessner/subscriptions","organizations_url":"https://api.github.com/users/goessner/orgs","repos_url":"https://api.github.com/users/goessner/repos","events_url":"https://api.github.com/users/goessner/events{/privacy}","received_events_url":"https://api.github.com/users/goessner/received_events","type":"User","site_admin":false},"created_at":"2017-05-30T20:13:00Z","updated_at":"2017-05-30T20:13:00Z","body":"@shockwavemoto: What does that patchwork of text fragments from previous posts mean ... ?"}}
{"actor":{"display_login":"goessner"}}