What is the Best JQuery WYSIWYM Textile Editor?

Lance Pollard picture Lance Pollard · Mar 12, 2010 · Viewed 18.1k times · Source

I need to use a Textile (preferably instead of Markdown), and am looking for a nice WYSIWYM (not WYSIWYG, because of this) JQuery editor.

I've seen these:

  • WMD - Markdown, Stack Overflow uses it
  • MarkItUp - Textile support but I don't know if it's WYSIWYM
  • WYMEditor

Which one supports both good HTML output and Textile?

Update: I only use Markdown now, mainly because it generates slightly more semantic html and it's much more widely adopted. That, and you can use the Cloud9 Ace Editor (source on GitHub) for not only markdown but everything TextMate does.

Answer

superlogical picture superlogical · Oct 12, 2012

Use Textile.js which is a fully featured Textile parser in JavaScript!

Use can try out the Textile live web editor here http://borgar.github.com/textile-js/

I am using it in combination with Markitup

Here is my simple code:

$(document).ready(function () {
    init();
});

function init() {
    var $content = $('.markitup'); // my textarea
    var $preview = $('#textile-preview'); // the preview div

    $content.markItUp(mySettings); // init markitup

    // use a simple timer to check if the textarea content has changed
    var value = $content.val();
    setInterval(function () {
        var newValue = $content.val();
        if (value != newValue) {
            value = newValue;
            $preview.html(textile.convert(newValue)); // convert the textile to html
        }
    }, 500);
};