用于 Markdown、Textile 等的 JavaScript 库; 锚参考
我需要一个 javascript 库来将结构化 ascii 文本即时转换为 html。 我对以下一点特别感兴趣:
我想在页面内使用锚定链接,请参阅 http://www.w3.org/TR/REC-html40/struct/links.html#h-12.1.1
哪个结构化文本库将支持此功能,或者如果它不受支持可以轻松扩展(我可以编写扩展)?
您能为“页面内链接”的结构化 ascii 文本提供一个良好且简单的语法建议吗?
<a href="#jumpend">jump to the end</a>
...some body text...
<a name="jumpend">this is the end</a>
我喜欢用“markdown”编写链接的方式,那么如何在要编写的扩展中以良好的方式表达名称锚点呢?
您知道或可以推荐哪些图书馆? 应该是多浏览器,良好且易于阅读和扩展干净的源代码,积极维护。
我目前正在查看 JavaScript Markdown 库“Showdown”: http://attacklab.net/showdown/
I need a javascript library to convert structured ascii text to html on the fly.
I am especially interested in the following point:
I would like do use anchored links inside pages, see http://www.w3.org/TR/REC-html40/struct/links.html#h-12.1.1
Which library for structured text would support this or if it is not supported could be easily extended (i could write an extension)?
Can you make a suggestion for a good and simple syntax for structured ascii text for "in page links"?
<a href="#jumpend">jump to the end</a>
...some body text...
<a name="jumpend">this is the end</a>
I like the way links are written in "markdown", so how could the name anchor in a to be written extension be expressed in a nice way?
Which libraries do you know or can you recommend? Should be multi browser, good and easy to read and extend clean source code, actively maintained.
I am presently having a look at the JavaScript Markdown library "Showdown": http://attacklab.net/showdown/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以查看markItUp!
You might look into markItUp!
我认为如果你正在寻找锚点引用,你不应该使用 markdown。 尝试以下 Creole Wiki 标记解析器:
I think that you should not use markdown if you are looking for anchor references. Try the following Creole Wiki markup parsers:
Textile 有一个内置的“脚注”机制:
从 Textile 2.2 开始,还有一个“注释列表”功能:textile.sitemonks.com/?eg=notes
Textile hast a builtin "footnote" mechanism:
As of Textile 2.2 there's also a "notelist" feature: textile.sitemonks.com/?eg=notes