Rendez-vous sur Arrakis

C'est lorsque nous croyons savoir quelque chose qu'il faut justement réfléchir un peu plus profondément. F. Herbert

txt2tags.js project

Download txt2tags.js


Developers can use Txt2tags.js to:

Quick Example

  <title>Txt2tagsjs - Txt2tags in Javascript</title>
  <script type="text/javascript" src="txt2tags.js"></script>
  <link rel="stylesheet" href="txt2tagsjs.css" />


	var text = "== Title ==\n **bold**, __underline__, //italic//.
                \n- list item 1\n- list item 2";
	var converter = new Txt2tags.converter();
	var myhtml = converter.makeHtml(text);


For some working examples, see:

Browser Compatibility

Txt2tags.js has been tested successfully with:

Known Differences in Output

In most cases, Txt2tags' output is identical to that of Python Txt2tags v2.6. What follows is a list of all known limitations. Please file an issue if you find more.

This should work correctly:

This doesn't work at all (yet):

Basically, the marked.js version should be slightly better.

Related projects

Tests (TODO: not yet)

A suite of tests is available which require node.js. Once node is installed, run the following command from the project root to install the development dependencies:

npm install --dev

Once installed the tests can be run from the project root using:

npm test

New test cases can easily be added. Create a txt2tags file (ending in .t2t) which contains the txt2tags to test. Create a .html file of the exact same name. It will automatically be tested when the tests are executed with mocha.


This project was forked from

Showdown Copyright (c) 2007 John Fraser.

Showdown maintained by Corey Innis and others

Marked.js Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)

txt2tags.js hacks by Eric Forgeot