本文介绍了我如何在我的网站上将WMD markdown语法转换为HTML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用django并在我的网站上实现WMD,只是想知道如何将markdown语法转换为HTML以进行显示,是否有某种功能我应该调用这个转换?

Am using django and am implementing WMD on my site, am just wondering how do i convert the markdown syntax to HTML for display purposes, is there some sort of function i should call to do this conversion?

处理降价的最好方法是什么?我是否将数据保存到数据库中,然后在显示数据库时进行解析,或者我应该保存转换的HTML,然后在编辑过程中将其转换为标记。

What is the best way to handle markdown ie. do i save the markdown as is to the database then parse it when displaying it or should i save the converted HTML then convert it to markup during editing?

推荐答案

查看附加组件它与Django一起提供。这是你正在寻找的。

Check out the markup add-on which comes with Django. That is what you are looking for.

还查看,如果你仍然坚持一些更多的细节。

Also check out this article for some more details if you're still stuck.

这篇关于我如何在我的网站上将WMD markdown语法转换为HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 03:35