markdown

WMD Preview Doesn't Match Output

I am using WMD in a google app situation whereby the site administrator can update the pages of the site and the users see the information. The preview function is working fine and I can see the text the way I want it to appear, but when I am in the users section, the markdown is being returned without the formatting - how can i fix th...

Markdown live preview in Textarea?

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...

Markdown vs. HTML in a CMS

I'm working on a fairly large CMS-like app that includes a forum, wiki pages, etc. What whould you chose between Markdown and HTML? I'm concerned about usability and the fact non-techie people will use this. Markdown has a very simple syntax but few users know it with HTML you can use a WYSIWYG editor but they are often terrible ...

Customizing MWD for math equations

HI, I want to customize the WMD editor (or wmd-new) to convert TeX equations like $\frac{2}{3}$ to Google Charts API images () Is it possible to customize how the HTML is generated? ...

What markup language to store in a DB?

Related: http://stackoverflow.com/questions/492515/how-to-store-lightweight-formatting-textile-markdown-in-database I want to store comment formatting in some markup language in our DB. However, we want to allow multiple formatting languages (markdown, textile, restructuredText). It seems we should store a superset of their features, so...

Citing the author of a blockquote using Markdown Syntax

I am using Symphony CMS and it uses Markdown for article writing. I need to do a blockquote of a quote from Benjamin Franklin and would like to have the quote followed by a citation beneath if but right now all it does is blockquote the whole line. How does one do this in markdown syntax? ...

Converting phpBB BBCode posts to Markdown

I have a phpBB2 forum with posts stored in BBCode. The forum posts are stored like this in the database: [quote:e5adceb8e8][quote:e5adceb8e8="Person 2"][quote:e5adceb8e8="Person 3"]Nested quote[/quote:e5adceb8e8]Another nested quote[/quote:e5adceb8e8]Some text[/quote:e5adceb8e8] [b:e5adceb8e8]Some bold text[/b:e5adceb8e8] [i:e5adceb8e8...

Add a class to an hyperlink with markdown

This is the original link <a href="http://link.com" class="noborder">my link</a>. How do I translate it to Markdown? I don't know how to put the class in. [mylink](http://link.com) ...

Best way to document a packet protocol

I often find myself in the situation of wanting to write a breakdown of the protocol that some program (either my own or some other by reading its code or RCE) uses for its network communication, but there is just no standard on how to document the structure of packets in those. What I usually do is to write the protocol documentation w...

How can I restrict Markdown syntax in Ruby?

I wish to implement Markdown in a Rails CMS comments system using a Ruby library such as Maraku or Kramdown. I need to restrict which Markdown features the users can submit. In this system users aren't allowed to insert to images, html, or perform any heavy editing, but emphasis and hyperlinks are okay. Essentially, I wish to create som...

How to load program resources in Clojure

How do you load program resources such as icons, strings, graphical elements, scripts, and so on in a Clojure program? I am using a project layout similar to that in many Java projects where there is a "resources" directory hanging off of a "source" directory. A jar file is created from the source and includes the resources, but I can't ...

Markdown blockquote parsing with ANTLR

This has been something that's been bothering me for a while. How does one go about parsing the following text into the HTML below using ANTLR? I can't seem to wrap my head around this at all. Any Ideas? Markdown: > first line > second line > blockquote> <p>first line second line</p> <blockquote> <p>nested quote</p> </b...

WMD Markdown from MySQL to HTML server site without showing the textarea

I store Markdown code in MySQL, and I’m worried about how to convert it back to HTML without transferring it through the WMD control and using massive data transfer. ...

Any hosted blog engine with integrated markdown and code highlighting?

Is anyone aware of any hosted blog engine (like wordpress.com for example) that supports writing posts in Markdown, and also supports code highlighting? ...

Capture text including line breaks, whitespace from DOM in jQuery?

Suppose I have the following HTML on the page: <div id="Test"> One Two </div> and this jQuery: var contents=$("div#Test").html() In Chrome and Firefox, the resulting string contents includes line breaks - that is, between "One" and "Two" there's character code 10. In IE, though, it seems to collapse any white space and line feeds t...

Markdown and Syntax Highlighting in Django with mixed code

I have some problems with following string while trying to syntax highlight them: Example <code class="php"><? echo "<input type=\"text\">"; ?></code> The php part is rendered correctly, but the html part breaks. I use the Markdown and Syntax Highlighting snippet from http://www.djangosnippets.org/snippets/119/ Any idea how to e...

MarkdownSharp/Markdown.NET: How to retrieve non-formatted text from markdown?

Sometimes it may be useful to transform markdown to pure text (for sending in e-mail for instance). Does any of these libraries support this functionality? (I'm actually more insterested in MarkdownSharp) EDIT Responding to Jorn's comment. I'll clarify what I expect from this kind of conversion: Markdown has special characters that, d...

PHP Markdown XSS Sanitizer

I'm looking for a simple PHP library that helps filter XSS vulnerabilities in PHP Markdown output. I.E. PHP Markdown will parse things such as: [XSS Vulnerability](javascript:alert('xss')) I've been doing some reading around and the best I've found on the subject here was this question. Although HTML Purifier looks like the best (nea...

How to treat single newline as real line break in PHP Markdown?

I was reading http://github.github.com/github-flavored-markdown/ I would like to implement that "Newline modification" in PHP Markdown: Best I could think of is: $my_html = Markdown($my_text); $my_html = preg_replace("/\n{1}/", "<br/>", $my_html); But this runs very unexpectable. ...

Can't seem to save the markup version of the text using wmd-editor

I'm running into an issue when I am saving the context of textarea using the wmd-editor it keeps wanting to save it as html. I have the following code: The input elements... <p> <%= this.Html.TextArea("Body", topic.Body, new { @class = "big" })%> </p> The script to make the out put markdown... <script type="text/javascript"> ...