[英]How to enable checkboxes in markdown preview for VSCode
I'm trying to enable markdown checkboxes in vscode markdown preview but am not having any luck.我正在尝试在 vscode markdown 预览中启用 markdown 复选框,但没有任何运气。 I've tried every combination of the following extensions with no luck:
我已经尝试了以下扩展的所有组合,但没有成功:
Does anyone have a configuration of extensions where this is working for you?有没有人有适合你的扩展配置?
As of January, 2022 this is working for me in a markdown preview:截至 2022 年 1 月,这在 markdown 预览版中对我有用:
<input type="checkbox" checked> some checked text
<input type="checkbox"> some unchecked text
NOTE This works in a published vscode extension markdown file (in the Marketplace):注意这适用于已发布的 vscode 扩展 markdown 文件(在市场中):
But I am still investigating getting it to work in github - any ideas?但我仍在调查让它在 github 中工作 - 有什么想法吗?
input
elements do not appear to be in the prohibited list so it "should" work somehow. input
元素似乎不在禁止列表中,因此它“应该”以某种方式工作。
But see https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/sanitization_filter.rb input
elements are not in the allowed list in the sanitizer file.但是请参阅https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/sanitization_filter.rb
input
元素不在 sanitizer 文件的允许列表中。
Here is the combination I use to replicate Github's styling for my READMEs这是我用来为我的 README 复制 Github 样式的组合
Make sure you reload VSCode after installing!确保安装后重新加载 VSCode!
Name: GitHub Markdown Preview
Id: bierner.github-markdown-preview
Description: Changes VS Code's built-in markdown preview to match GitHub
Version: 0.2.0
Publisher: Matt Bierner
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview
I just noticed that for the extension "Markdown Checkbox" by Matt Bierner to work properly in checking boxes in preview, you have to either disable or uninstall "Markdown All in One".我刚刚注意到,要让 Matt Bierner 的扩展“Markdown Checkbox”在预览中的复选框中正常工作,您必须禁用或卸载“Markdown All in One”。 All in One seems to be prioritized in the rendering of the checkboxes over the first extension in which they can actually be checked
All in One 似乎在渲染复选框时优先于第一个可以实际检查它们的扩展
Could be great to have some kind of fork in between both extensions.在两个扩展之间有某种分叉可能会很棒。
Foudn this here: https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts在这里找到: https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts
You can do markdown checkboxes like this in VSCode text boxes (and I'm sure.md files too) in list items:您可以在列表项的 VSCode 文本框中(我也确定.md 文件)中执行 markdown 复选框:
to "set" the check box, replace the space in the square brackets with a X.要“设置”复选框,请将方括号中的空格替换为 X。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.