wmd

Convert HTML back to Markdown for editing in wmd

淺唱寂寞╮ 提交于 2019-11-27 20:10:07
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 it reliable enough to simply convert the HTML back to markdown to show in the wmd editor? Thanks! Look at the optionsExample.html in your WMD distribution. There's an option to send the result to the server as Markdown. If you want to convert HTML to Markdown in batch, I can recommend Aaron Swartz’s html2text.py Python script with which you can just:

Simple HTML sanitizer in Javascript

China☆狼群 提交于 2019-11-27 20:05:09
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 live preview isn't filtered, like it here on SO. I am looking for a simple/quick HTML sanitizer written in JavaScript so that i can filter the contents of the preview window. No need for a full parser with complete XSS protection. I'm not sending the output back to the server. I'm sending the Markdown to the server where I use a proper, full HTML

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

耗尽温柔 提交于 2019-11-27 08:58:26
问题 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 editor, some with a few basic enhancements and some with serious differences from the Stack Overflow one. Since this will be the heart of the application, I'd like to start with the best code base I can. I'd be happy if anyone can recommend which one

Convert HTML back to Markdown for editing in wmd

橙三吉。 提交于 2019-11-27 04:25:24
问题 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 it reliable enough to simply convert the HTML back to markdown to show in the wmd editor? Thanks! 回答1: Look at the optionsExample.html in your WMD distribution. There's an option to send the result to the server as Markdown. 回答2: If you want to