We have used the redcloth and bluecloth wiki renderer's with Ruby, basically you can do something like this...
html = RedCloth.to_html(wiki_content)
and poof, you get back HTML.
Is there something out there for C#/.NET ?
There are some wiki rendering engines but the names escape me right now. Perhaps check out some of these open-source options? I've previously reviewed MindTouch from that list for an application and it was quite rich, but it did much more than I needed to do.
If you just need something to turn text into HTMLcontent, I use Halide which lets people type in a textarea then it'll HTML-ify links, remove dangerous content, add <p></p>
and <br />
, etc. Very simple but no built-in formatting options.
SO uses a custom version of Markdown for their text editor and HTML content rendering. Search google for Markdown.NET for a number of ports.
来源:https://stackoverflow.com/questions/450937/wiki-rendering-engine-for-c-like-redcloth-bluecloth-or-something-decent