有没有好的Markdown Javascript库或控件? [英] Is there any good Markdown Javascript library or control?

查看:123
本文介绍了有没有好的Markdown Javascript库或控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想构建一个网站,用户可以在其中输入文字并在Markdown中对其进行格式化。我之所以喜欢Javascript解决方案,是因为我想要显示实时预览,就像在StackOverflow上一样。

I want to build a site where the user can enter text and format it in Markdown. The reason I'd like a Javascript solution is because I want to display a live preview, just like on StackOverflow.

我的网站不针对开发人员,所以编辑器控件是理想的。

My site is not targeted at developers, however, so an editor control would be ideal.

我在StackOverflow上收集它,正在使用WMD编辑器。

I gather that on StackOverflow, the WMD editor is being used.

快速搜索谷歌也会出现Showdown库,我认为它实际上是由WMD使用的。

A quick search on Google also turns up Showdown library, which I think is actually being used by WMD.

还有其他选择吗? WMD / Showdown是否已经成为很好的工具?您对不同选项的体验是什么?

Are there any other options? Are WMD/Showdown great tools already? What have been your experiences with the different options?

推荐答案

如果您不喜欢使用Ajax生成实时预览,然后另一个选择是 markItUp!。 markItUp!是一个通用的标记编辑器,非常灵活。它提供
创建标记编辑器的简单方法,但与WMD不同,它不提供自己的实时预览。

If you're not adverse to using Ajax to generate the live preview, then another option is markItUp!. markItUp! is a universal markup-editor, and very flexible. It does provide an easy way of creating a markup editor, but unlike WMD, it doesn't provide its own live preview.

我使用了markItUp!,一个简单的JSP(使用 MarkdownJ )和我的一个开源项目(a Markdown插件 = noreferrer>辊)。如果您正在使用其他服务器端技术,请根据需要替换该简单的JSP。

I used markItUp!, along with a simple JSP (using MarkdownJ) for one of my open-source projects (a Markdown plugin for Roller). If you're using another server-side technology, replace that simple JSP as appropriate.

在我遇到WMD之前,我实际上已经开始使用它了。我同意,大规模杀伤性武器是伟大的,但只是刚刚开源,并且在现阶段,更难以定制行为。

I actually starting using this before I came across WMD. I'd agree, WMD is great, but has only just been open-sourced and is, at this stage, more difficult to customize the behavior of.

这篇关于有没有好的Markdown Javascript库或控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆