Can I add a tabbed widget to my Markdown page?

孤者浪人 提交于 2019-12-24 18:53:21

问题


I would like to add a tabbed widget to toggle between different views of similar content. Something like the way Xamarin's documentation lets users toggle between Visual Studio for Windows and Visual Studio for Mac:

Is this possible?


回答1:


Markdown doesn't support anything like that. After all, it was designed for writing prose:

The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown’s formatting syntax only addresses issues that can be conveyed in plain text.

GitHub Flavored Markdown adds support for some features not included in the original Markdown specification (e.g. tables, strikethrough, fenced code blocks with syntax highlighting) but nothing like a tabbed interface.

I'm not aware of any Markdown implementations that offer something like this.

The best alternative using pure Markdown would be to simply include headers to separate your OS-specific instructions, e.g.

# Step 1

## Windows

...

## macOS

...


来源:https://stackoverflow.com/questions/49104108/can-i-add-a-tabbed-widget-to-my-markdown-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!