markdown-js icon indicating copy to clipboard operation
markdown-js copied to clipboard

Does not support normal HTML

Open Andrewyg opened this issue 8 years ago • 6 comments

Normally markdown editor should support html tag but if you write some thing like <a>hi</a> it'll become something like this <p>&lt;a&gt;hi&lt;/a&gt;</p this should be fine but how about <h1>hi</h1> it'll become <p><h1>hi</h1></p> where the browser will show

hi

Andrewyg avatar Jul 13 '17 14:07 Andrewyg

I have found the same problem !

begogna avatar Aug 02 '17 10:08 begogna

Same here. markdown-js should honor existing HTML markup w/in the text, instead, it escapes it. Please fix?

jduprey avatar Sep 29 '17 20:09 jduprey

Any update? I'll have to use a different library if this isn't supported

EDIT: Oops, didn't realise this library was dead. There's a PR for adding HTML support that has been un-merged since 2014. https://github.com/evilstreak/markdown-js/pull/98

3stacks avatar Oct 01 '17 09:10 3stacks

marked - seems to be an acceptable replacement. https://github.com/chjj/marked

jduprey avatar Oct 04 '17 03:10 jduprey

@jduprey, I just switched over to this library last night. It's working perfectly for me, as you can override each individual render method, which allowed me to do all intermediate manipulations I needed.

Can't recommend it enough.

3stacks avatar Oct 04 '17 04:10 3stacks

Yes. I, too, switched slightly after my original post and it seems to work great.

jduprey avatar Oct 04 '17 09:10 jduprey