MongoDB & Showdown. Save markdown as string

1.9k Views Asked by At

I've tried researching this and have not found and answer.

What im trying to do is saving markdown in mongodb as a string without parsing it. just saving it as a string..

Then fetch the markdown string from mongodb and use Showdown in react to parse it. However i cant get it to work.

Showdown seem to parse like the first markdown style for example # Dillinger [![N|Solid](https://cldup.com/dTxpPi9lDf.thumb.png)](https://nodesource.com/products/nsolid)

Would become <h1>dillingernsolidhttpscldupcomdtxppi9ldfthumbpng</h1>

Kinda gotten stuck now.

Have someone made something similar and gotten it to work?

1

There are 1 best solutions below

0
On

Disclaimer: I'm showdown's current maintainer.


In showdown's demo page your example is working properly.

So, it seems the issue might be in storing/retrieving the text from the database.