I have a node.js app and I want to allow my users to enhance their messages with a little markdown. But only a little. I want
- Sanitization
- Bold (**) and Italics (*)
- Links
And that’s about it, nothing more. But I may need more later, when extending the messaging system.
I’ve looked at showdown, markdown-js and PageDown. Only the latter had sanitising, but all of them are not configurable. PageDown was most promising, but I couldn’t get it to not produce <p>‘s around the output.
Is there some other alternative that allows me more control?
There is a rather new converter which supports direct access to the lexer. I think it will be what you need: https://github.com/chjj/marked