• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

madskristensen/MarkdownEditor: A Visual Studio extension

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

madskristensen/MarkdownEditor

开源软件地址(OpenSource Url):

https://github.com/madskristensen/MarkdownEditor

开源编程语言(OpenSource Language):

C# 81.0%

开源软件介绍(OpenSource Introduction):

Markdown Editor

Build status

Download this extension from the VS Gallery (VS 2022) or get the CI build.


A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

See the change log for changes and road map.

Features

  • Powered by Markdig - the best markdown parser
  • Syntax highlighting
  • Live preview window with scroll sync
  • Mermaid chart support
  • CommonMark and GitHub flavored Markdown
  • High-DPI support
  • Drag 'n drop of images supported
  • Paste image from clipboard directly onto document
  • Outlining/folding of code blocks
  • Keyboard shortcuts
  • Light Bulbs
  • Brace completion with type-through
  • Lightning fast
  • Auto-generate HTML files

Syntax highlighting

All fonts can be changed in Tools -> Options -> Environment -> Fonts and Colors dialog.

Font Options

GitHub and other flavors

Advanced markdown extensions are supported to give more features to the syntax. This includes pipe tables, emoji, mathematics and a lot more.

Live Preview Window

The preview window opens up on the right side of the document when it opens.

Preview window

Every time the markdown document is modified, the preview window will update.

Any code blocks receives full syntax highlighting in the preview window. Here's an example of JavaScript code rendered.

Code Colorizing

The preview window is automatically scrolled to match the scroll position of the document. As the document is scrolled up and down, the preview window will follow.

Live preview can be disabled in the settings.

The syntax highlighter is powered by Prism

Custom stylesheets

The preview window supports loading of custom stylesheets. It will look for a file called md-styles.css in the same directory as the currently opened markdown file or any parent directory.

If no md-styles.css file is found it will look for it in %userprofile%. If it still isn't found it will use the built in stylesheet.

To generate a custom stylesheet, simply right-click inside the markdown editor document and select Add Custom Stylesheet...

Custom Stylesheet

The name of the custom stylesheet can be changed in the settings.

Preview HTML template

The preview window also supports loading of HTML template, which will be detailed in Auto-generate HTML files section.

When the markdown document is updated, the markdown editor will call onMarkdownUpdate function if it exists. With this feature, you can support your own scripts, for example KaTeX for LaTeX.

Drag 'n drop images

Drag an image directly from Solution Explorer onto the document to insert the appropriate markdown that will render the image.

Paste images

This is really helpful for copying images from a browser or for inserting screen shots. Simply copy an image into the clipboard and paste it directly into the document. This will prompt you for a file name relative to the document and then it inserts the appropriate markdown.

It will even parse the file name and make a friendly name to use for the alt text.

Outlining

Any fenced code and HTML blocks can be collapsed, so that this:

Outlining Expanded

...can be collapsed into this:

Outlining Collapsed

Keyboard shortcuts

Ctrl+B makes the selected text bold by wrapping it with **.

Ctrl+I makes the selected text italic by wrapping it with _.

Ctrl+Shift+C wraps the selected text in a code block.

Ctrl+Space checks and unchecks task list items.

- [x] task list item

Tab increases indentation of list items.

Shift+Tab decreases indentation of list items.

Ctrl+K,C wraps the selection with HTML comments.

Ctrl+K,U removes HTML comments surrounding the selection/caret.

Ctrl+PgUp moves caret to previous heading

Ctrl+PgDown moves caret to next heading

Light Bulbs

The suggested actions shown in light bulbs makes it easier to perform common tasks.

Light bulbs

For instance, converting the selected text to a link will result in this:

Light bulbs image

Auto-generate HTML files

By right-clicking any Markdown file in Solution Explorer, you can turn on automatic generation of a HTML file.

Generate HTML

It will wrap the output rendered markdown in a HTML template that looks like this:

<!DOCTYPE html>
<html>
<head>
    <title>[title]</title>
</head>
<body>

    [content]

</body>
</html>

You can provide your own HTML template by dropping a file with the name md-template.html in the same or parent folder to the markdown file. If not found, it will search %userprofile%.

Just make sure to include the [content] token in the template. And the [title] token is optional if you need a title.

Settings

Control the settings for this extension under Tools -> Options -> Text Editor -> Markdown

Options

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

License

Apache 2.0




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
gonzalezreal/MarkdownUI: Render Markdown text in SwiftUI发布时间:2022-08-17
下一篇:
tinacms/tinacms: A headless CMS for Markdown发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap