Posted by davideads on June 3, 2011 at 1:18pm
As part of my project for the US Department of Energy, I've released a module called Markdownify for work than integrates the Markdowify PHP library (convert HTML to Markdown) and provides a TinyMCE plugin that allows TinyMCE to be used as a Markdown source editor.
Check out the Markdownify module on Github.
Implementations:
- Townsquare editor: A Drupal 7 implementation, part of the Townsquare project. See Townsquare's Markdown test page to see rendered output.
- E-center editor: A Drupal 6 implementation, part of the E-Center project.
Here are some screenshots of the editor in action:
- http://skitch.com/eads/fn463/townsquare-editor-01-wysiwyg-intro
- http://skitch.com/eads/fn49r/townsquare-editor-02-image-list
- http://skitch.com/eads/fn49u/townsquare-editor-03-markdown-source
- http://skitch.com/eads/fn49a/townsquare-editor-04-more-syntax
- http://skitch.com/eads/fn492/townsquare-editor-05-rendered-page
- http://skitch.com/eads/fn494/townsquare-editor-07-linkit

Comments
I'd love to see the
I'd love to see the unformatted source of the "complex markup example" at the bottom. One of the thing that frustrates me about Markdown is that I'm not clever enough to extend it in a logical way. I'd really like to integrate a few class attributes without it turning into HAML or a giant bag of mess.
Complex markup
The complex markup source should look exactly like the html in the source -- simple, semantic html. You just have to wrap the html inside a block level element like a div. TinyMCE will happily edit inside it.
Sign up for a test account on townsquare to see the source. I will put a demo, ready-only version up some time next week so people can play with it.
Neat!
Thanks for making it available David!
Yonas Yanfa
TinymceSupport.com - Support, Consulting, and Development.
drupal_html_to_text
Just want to point out that there is function in core that provides something similar:
http://api.drupal.org/api/drupal/includes!mail.inc/function/drupal_html_to_text/7