views:

2006

answers:

8

Is there a wysiwyg editor for the web, like tinymce or wmd, which can produce restructured text? I'm looking for something which can be integrated with django.

I would like to use rst instead of markdown because I need to convert the content entered to pdf and do some layout specific things which make rst look like a better choice.

A: 

Take a look at wmd editor it's Markdown, not ReST but probably covers what you're looking for.

Actually, I think it's the editor we use at StackOverflow, right?

Santi
He wants something for Restructured Text, not Markdown.
lost-theory
Sorry, I didn't realize there was any difference between markdown and ReST. Anyway, they are almost the same and I still think it's the best editor. (I don't agree with that -1)
Santi
He even said in his answer he wants something "like tinymce or wmd". Why link to wmd if he already mentioned it and wants something else?
lost-theory
That was an update
Santi
+3  A: 

Sorry, I don't believe there are any web WYSIWYG ReST editors :(

You might be able to use something like TinyMCE (preferably something that outputs very clean HTML), then convert the resulting HTML to ReST using html2rst.py.

Another cheap solution would be to re-use something like the Mediawiki editor, customizing the buttons it provides like this:

<script type='text/javascript'>
/*<![CDATA[*/
addButton("images/button_italic.png","Italic text","*","*","Italic text","mw-editbutton-italic");
addButton("images/button_bold.png","Bold text","**","**","Bold text","mw-editbutton-bold");
addButton("images/button_headline.png","Headline","","\n=============","Headline text","mw-editbutton-headline");
...
</script>

This is not WYSIWYG though, it's more like the editor here on SO. You'd be editing the document as raw ReST.

Do you want the live preview like StackOverflow has? If so, you'll have to either render the ReST in Javascript, or send it to the server and update via Ajax, and I don't believe there's a JS implementation of a ReST renderer.

lost-theory
+3  A: 

I would take a look at the MarkItUp! Universal Markup Editor, which is a fully customizable WYSIWYM editor. You'd edit raw ReST with toolbar helpers, and it's easy to set up AJAX-based preview. There isn't a ReST toolbar set on their site, but creating a new set is ridiculously easy.

Integrates easily with Django via the django-markitup reusable app.

Carl Meyer
A: 

Yes. There is such a thing.

http://cometdemo.lshift.net:8080/greed/welcome%5Fdocument/

Steve Ferg
This link does not work.
dar
Also, this requires the user to enter rest, which is not going to work for my users. They would much rather use the tinymce interface.
dar
A: 

Try An editor for ReStructured Text from enthought apptools

I tried on windows vista + python2.5 and it works

leo
A: 

Give Notepad++ a try. It might not integrate, but it's still worth using if you can't find a better solution.

Caleb Thompson
A: 

You could pipe it in and out of pandoc: http://johnmacfarlane.net/pandoc/index.html

This way you can offer the user multiple ways of editing the text whilst keeping it in reST format in the database.

Phillip.

Phillip
+1  A: 

Simple online editor for ReST http://rst.ninjs.org/

mirrorw
Link doesn't work.
rebus