JavaScript libraries for Markdown, Textile and others; Anchor references
Asked Answered
S

3

6

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/

Smoking answered 21/5, 2009 at 21:0 Comment(0)
Y
2

I think that you should not use markdown if you are looking for anchor references. Try the following Creole Wiki markup parsers:

Yolandoyolane answered 28/12, 2009 at 10:28 Comment(1)
You're welcome! Good to know it helped. If this is what you were looking for, don't forget to set the answer as accepted ;)Yolandoyolane
E
3

You might look into markItUp!

Eldin answered 22/5, 2009 at 1:55 Comment(1)
I believe that markItUp relies on the server to do the parsing.Yolandoyolane
Y
2

I think that you should not use markdown if you are looking for anchor references. Try the following Creole Wiki markup parsers:

Yolandoyolane answered 28/12, 2009 at 10:28 Comment(1)
You're welcome! Good to know it helped. If this is what you were looking for, don't forget to set the answer as accepted ;)Yolandoyolane
R
0

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

Ruthie answered 14/7, 2013 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.