简体   繁体   English

如何在摩纳哥编辑器中获得Markdown预览?

[英]How to get Markdown preview in the Monaco Editor?

VSCode has for .md markdown files, "Open Preview". VSCode具有用于.md markdown文件的“打开预览”。 How to get that same functionality? 如何获得相同的功能? Is it included? 包括在内吗? I looked through the playground examples and the API, but do not see anything. 我浏览了游乐场示例和API,但是什么也没看到。 Thanks. 谢谢。

This functionality is not part of Monaco. 此功能不属于摩纳哥。

I wouldn't bother with trying to get the preview into Monaco itself; 我不会为尝试将预览引入摩纳哥而烦恼。 just grab the markdown content from the editor, pass it through a markdown rendering engine like markdown-it , and preview the generated html in a iframe or similar. 只需从编辑器中获取markdown内容,将其传递给markdown-it之类的markdown呈现引擎,然后在iframe或类似框架中预览生成的html。 See the markdown-it demo for inspiration 请参阅markdown-it演示以获取灵感

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM