Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support richer rendering of markdown, such as rendering links as their link name only (hiding link url) while not under cursor #119897

Closed
koenlek opened this issue Mar 25, 2021 · 2 comments
Assignees
Labels
markdown Markdown support issues *out-of-scope Posted issue is not in scope of VS Code

Comments

@koenlek
Copy link

koenlek commented Mar 25, 2021

Context
Currently, markdown rendering seems to be strictly limit to always render each character position, with some flexibility within that position (such as changing color, bold, italic, underline). This makes sense as VS Code editing at its core is about plain text editing.

Some other markdown renderers, such as Zettlr, are striking a nice balance between plain text and WYSIWYG. They keep all the properties of plain text (every property that affects rendering is explicitly visible to the user) while providing some nice enhancements to rendering. Some of the features of editors like Zettlr that I like:

  1. Render links ([text](http://url)) as link-name by default (text), only expanding it when the cursor is at the link.
  2. Render images. Again, as soon as you select it, it turns into raw markdown again.
  3. Render latex to render formulas.
  4. Render headers at a larger font.

I very much like it that the editor and the rendered output are in the same view. I strongly prefer that over the two column approach that VS Code currently has (left column editor, right column a rendered markdown preview), as that is much less effective use of my screen real estate.

Request

Could we add such richer rendering to VS Code markdown editor (either native or as an extension)? I doubt if it would even be possible as an extension today, as it would need to allow the extension to tamper with the rendered content of the editor window in a way that hides characters or other fancy stuff (like img rendering).

The 4 examples above are already in order of priority to me. I care by far the most about rendered links. I often add long links to my markdown (with huge BASE64 encoded settings in the URL) and they totally clutter the editor for me, loosing overview of the overall document structure. This also seems the simplest, as it can be done without breaking a grid-like monospace character layout.

Example screenshot of the rendered links:
image

image

Possibly related

I found #91987 and based on some discussions I read I was hoping that this could unblock my needs. I deed a quick try with the Insiders release and the Markdown Notebook extensions, but that doesn't seem to address my feature request yet.

@mjbvz mjbvz added *out-of-scope Posted issue is not in scope of VS Code markdown Markdown support issues labels Mar 25, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 25, 2021

Some of these features may be possible to add with extensions. However VS Code's built-in markdown support is focused on text editing instead of offering a wysiwyg-lite experience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
markdown Markdown support issues *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants
@koenlek @mjbvz and others