Questions tagged [wmd]

120 questions
62
votes
5 answers

Which Stack-Overflow style Markdown (WMD) JavaScript editor should we use?

Background I'm working on an application which requires user-entered content, and I've decided to use a Stack Overflow-style Markdown editor. After researching this topic for the last few days, I realize there are numerous forks of the base WMD…
Edan Maor
  • 9,772
  • 17
  • 62
  • 92
48
votes
3 answers

Simple HTML sanitizer in Javascript

I'm looking for a simple HTML sanitizer written in JavaScript. It doesn't need to be 100% XSS secure. I'm implementing Markdown and the WMD Markdown editor (The SO master branch from github) on my website. The problem is that the HTML shown in the…
Sander Marechal
  • 22,978
  • 13
  • 65
  • 96
18
votes
5 answers

Convert HTML back to Markdown for editing in wmd

I am curious to do what happens when you edit a post on this site. I am using wmd for my markdown editor, of course when I goto edit, I get the HTML it generated not the markdown like on stackoverflow. Now, is there a way I can store both? or is…
Ryan M
  • 605
  • 1
  • 8
  • 17
14
votes
3 answers

Should i sanitize markdown?

For my post entity i store both HTML and MARKDOWN in database (HTML is converted from MARKDOWN). HTML is for rendering on page and MARKDOWN for editing ability (with WMD). I sanitize HTML before storing to db. Question is: should i sanitize markdown…
admax
  • 1,671
  • 2
  • 16
  • 23
11
votes
2 answers

Hosted wiki using StackOverflow-like editing tools?

We're starting developer documentation for one of our projects, and I'd like to set it up as a hosted wiki. There will be lots of code samples, and the WMD/Prettify combination used here on StackOverflow is the simplest way I've seen to enter…
Herb Caudill
  • 50,043
  • 39
  • 124
  • 173
11
votes
1 answer

Adding a custom button to WMD (Stack Overflow) editor

How can I add a new button in the WMD editor, like the code button? If I click on the button tag will add on the selected text like code button.
Warrior
  • 5,168
  • 12
  • 60
  • 87
11
votes
4 answers

Why do I need Markdown?

Why do I need a Markdown with a front edit editor like WMD? What does the markdown do to the content that’s sent from the WMD editor? How does Markdown store the content in the backend? Is it the same way like *bold* or in some other format? Why…
Quintin Par
  • 15,862
  • 27
  • 93
  • 146
11
votes
2 answers

How do get WMD-Editor to post Markdown to the server and not HTML?

It seems that WMD-Editor is posting HTML to the server instead of the markdown. How can i get it to send the Markdown?
usr
  • 168,620
  • 35
  • 240
  • 369
10
votes
4 answers

WMD in Django Admin?

I know how to use WMD and other such javascript editors in regular django forms using widget=. However, how do I use WMD for text fields in the Django admin? On top of that, how do I use it for the content field on contrib.flatpages in the admin?…
Apreche
  • 30,042
  • 8
  • 41
  • 52
10
votes
2 answers

How do you store the markdown using WMD in ASP.NET?

I have implemented the WMD control that Stack Overflow uses into a project of mine, it almost works like a charm, but when I save the changes to the database it is saving the HTML version and not the Markdown version. So where I have this in my text…
mattruma
  • 16,589
  • 32
  • 107
  • 171
9
votes
3 answers

How to combine WMD and prettify, like Stack Overflow?

Prettify needs class="prettyprint" to be add to
 or . How to let WMD do this? 
Mask
  • 33,129
  • 48
  • 101
  • 125
9
votes
4 answers

WMD markdown editor - HTML to Markdown conversion

I am using wmd markdown editor on a project and had a question: When I post the form containing the markdown text area, it (as expected) posts html to the server. However, say upon server-side validation something fails and I need to send the user…
gg1
7
votes
3 answers

Ideas on implementing Stack Overflow-style comments

I like the Stack Overflow comment UI a great deal and I'm looking into implementing the same thing on my own website. I looked at the code and it looks like the main tool here is WMD, with the JQuery TextArea Resizer playing a supporting role. WMD…
user41871
6
votes
4 answers

Multiple WMD editors (SO forked version) on one page?

To be clear, I'm referring to the usage of stackoverflow's forked WMD, not the original version from attacklab. I'd like to use the forked version, however it seems that the div id's which are used by the script to identify the page elements to…
Idan Gazit
  • 2,500
  • 3
  • 20
  • 24
6
votes
3 answers

How to add upload utility to wmd editor?

Has anyone succeeded to do this?
Mask
  • 33,129
  • 48
  • 101
  • 125
1
2 3 4 5 6 7 8