轻量级富文本编辑器

轻量级富文本编辑器

本文介绍了轻量级富文本编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找非常类似于SO WMD降价编辑器的东西,它非常轻巧,但是我希望文本区域在您键入时显示预览".我调查了许多Rich编辑,但他们似乎都在阳光下做所有事情.我真正想要的只是粗体,斜体,链接,图像和列表(有序/无序).

I am looking for something very simlar to the SO WMD markdown editor that is extremely lightweight but I would like the text area to display the "preview" as you type. I have looked into many Rich editors but they are all seem to do everything under the sun. All I really want is Bold, Italic, Link, Image, and Lists (ordered/unordered).

推荐答案

最轻巧的方法是自己动手.最简单的方法是使用Java脚本对< textarea> 的更改做出反应,然后使用Markdown翻译来更新其下方的÷ div> . Showdown .

The most lightweight way to go would be to roll your own. The simplest way to do it would be to use Javascript to react to changes to a <textarea>, and then update a <div> underneath it with the Markdown translated. A good Markdown implementation in Javascript is Showdown.

这篇关于轻量级富文本编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 11:53