用于 Markdown、Textile 等的 JavaScript 库; 锚参考

发布于 2024-07-21 03:00:03 字数 749 浏览 7 评论 0原文

我需要一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独﹏钓一江月 2024-07-28 03:00:03

您可以查看markItUp!

You might look into markItUp!

只是在用心讲痛 2024-07-28 03:00:03

我认为如果你正在寻找锚点引用,你不应该使用 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:

一杆小烟枪 2024-07-28 03:00:03

Textile 有一个内置的“脚注”机制:

.. AJAX[1] ...

fn1. Asynchronous JavaScript and XML ..

Textile 2.2 开始,还有一个“注释列表”功能:textile.sitemonks.com/?eg=notes

Textile hast a builtin "footnote" mechanism:

.. AJAX[1] ...

fn1. Asynchronous JavaScript and XML ..

As of Textile 2.2 there's also a "notelist" feature: textile.sitemonks.com/?eg=notes

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文