Skip to content
Advertisement

Tag: wysiwym

Markdown to convert double asterisks to bold text in javascript

i’m trying to make my own markdown-able textarea like Stackoverflow has done. The goal is to allow people to type **blah blah** in a textarea and have the output in a div be <span style=”font-weight:bold;”>blah blah</span>. I’m having trouble with the javascript to find and replace to the **asterisks with the HTML. here’s a jsfiddle which has gotten the party

Advertisement