Vscode: Extract the MarkDown editor into an extension

Created on 4 May 2016  路  6Comments  路  Source: microsoft/vscode

@bpasero please document the features that are still missing

markdown plan-item

Most helpful comment

Done-Done criteria:

  • [x] Test Plan Item created
  • [x] Keyboard accessible
  • [x] Screen reader accessible
  • [x] Works with the different themes, including the high contrast theme
  • [x] Telemetry events in place
  • [x] Release notes updated

All 6 comments

@egamma @kieferrm @Tyriar I started a markdown extension last milestone and you can find it here: https://github.com/bpasero/vscode-markdown

It was created using the TM language from [1] and it leverages our virtual document preview support to show a preview. It depends on markdown-it [2] and highlight.js for the preview rendering.

There is functionality missing to make it a replacement of our markdown support:

  • we need to investigate how to support embedded languages in the markdown editor (not for the preview, this is for the source) so that code blocks get colored properly. according to @aeschli TM supports the notion of referencing other grammars from within a grammar. ideally we could reference our installed TM bundles for any code block that is being used in the markdown source
  • we need to change the extension to update the preview based on document edits so that the preview updates while the user is typing
  • we need to finish the CSS styling for the preview so that it is in sync with what we have today and also works in dark and light theme and any other theme from extensions (also depends on https://github.com/Microsoft/vscode/issues/5737)
  • we need to bring back the functionality that the preview scroll position stays stable when you make changes or even find a way to scroll the preview in sync with the editor scrolling (that would be a cool feature)
  • we currently do not have support to contribute actions to the context menu of the explorer or to the editor title area, but we have actions there to open a preview from a markdown file in both places and we also have an action to jump back to the source from a markdown preview
  • there is a setting in our markdown preview to configure a custom CSS style to use and this setting needs to be added to the extension too
  • anything labeled markdown [3] is something to revisit once we work on the extension

[1] https://github.com/textmate/markdown.tmbundle/blob/master/Syntaxes/Markdown.tmLanguage
[2] https://github.com/markdown-it/markdown-it
[3] https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Amarkdown

@bpasero I love that you are switching from marked to markdown-it, it seems much more active and is pluggable. I would really love to see checklists integrated by default, it is awesome for ToDo-lists - would it work to actually check a checkbox in the preview and it would change the source file? That would be awesome

Returning to source in the markdown preview is related to this issue #6941
There is no way to detect a virtual document with focus when a command is triggered.

Current state:

  • markdown as an extension is in https://github.com/Microsoft/vscode/tree/kieferrm/markdown
  • we miss the editor title area contribution: #7064
  • markdown source colorization needs to be beautified: #7068
  • the display performance is sub-par: #7066
  • there are several defects: #5038, #7067
  • extension needs to be part of the regular translation process: #7065
  • Toggling between source and preview using the same keyboard shortcut is limited by #6941. Current workaround is to use the workbench.action.navigateBack command.

Current state:

  • Code is ready for merging into master (see https://github.com/Microsoft/vscode/issues/7656).
  • We miss the editor title area contribution. This is being addressed in #3192.
  • The display performance is sub-par. See updates in #7066.
  • Toggling between source and preview using the same keyboard shortcut is limited by #6941. Current workaround is to use the workbench.action.navigateBack command.

Done-Done criteria:

  • [x] Test Plan Item created
  • [x] Keyboard accessible
  • [x] Screen reader accessible
  • [x] Works with the different themes, including the high contrast theme
  • [x] Telemetry events in place
  • [x] Release notes updated
Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisdias picture chrisdias  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

lukehoban picture lukehoban  路  3Comments

v-pavanp picture v-pavanp  路  3Comments

shanalikhan picture shanalikhan  路  3Comments