views:

327

answers:

3

Are there any Javascript Markdown editing toolbars or libraries that show the live preview within the textarea and hide the formatting marks (, _ etc), similar to TinyMCE's implementation?

If not, how would I go about implementing this in jQuery?

I'm currently using MarkItUp, which only shows the preview after the textarea, or in a pop-up.

This post refering to 'BlueCloth' sounds close, but although im interested in general implementation a RoR version isn't very useful at this stage (I'm using Python/Zope).

I'm aware that most of the beauty of Markdown is it's simple text formatting characters, but the site in question is fairly non-technical and I'm largely using the Markdown Python library for it's 'evil' html stipping abilities.

UPDATE: In response to comments, I suppose I'd be happy for the formatting marks to display if typed, but not if the toolbar is used (i.e. I'm assuming GUI users are less technical users).

Or, other toolbars have a 'source' view, which might be an option.

A: 

You mean like the one they use on StackOverflow?

Jonathan Feinberg
He wants the markup itself hidden, and the resulting HTML preview shown in the text area. Pretty sure this isn't it.
The Wicked Flea
WMD? No, that shows a live preview **after** the textarea.
Jon Hadley
In which case what you're asking for is nonsensical. You wnt the underscores, asterisks and such to *disappear* as you're typing? That would drive anyone insane.
Jonathan Feinberg
Jonathan, not exactly, I want the formatting marks not to show if the toolbar is used. Will add to original question.
Jon Hadley
Then... why did you mention Markdown, if you just want a WYSIWYG HTML editor?
Jonathan Feinberg
1) Because Markdowns 'evil' html stripping is good.2) I don't need full HTML, just bold, italic, link.3) It seemed like a good idea at the time! Markdown appeared to be the current rich text editor of choice....
Jon Hadley
Markdown is not a "rich text editor"; it's a small language for describing formatted text.
Jonathan Feinberg
Marked this as correct answer, although it's the assertion in the comments that "Markdown is not a "rich text editor"; it's a small language for describing formatted text." that is the 'answer' ;)
Jon Hadley
A: 

CKEditor might be too heavy, but it is nice.

Upper Stage
Does it use Markdown? Can't find any obvious reference to it on the site.
Jon Hadley
On a related note, good to see FCKEditor finally got renamed ;)
Jon Hadley
I couldn't agree more.
Upper Stage
CKEditor is a fully JS implementation that uses iFrames. No underlying technology or software. (They even have their own library of JS functions.)
Upper Stage
A: 

The only way you can achieve it is using an iframe.

Joó Ádám
Really? CKEditor and TinyMCE seem to manage without....
Jon Hadley
but not in internet explorer @ Jon Hadley
Hippo