bootstrap-markdown
bootstrap-markdown copied to clipboard
Syntax hightlight
When you edit it would be very cool if the text would be hightlighted. For example when you add a title the text can be a little bit stronger. This will help to see the structure of the text.
Very nice editor thanks.
:+1:
I think you can integrate CodeMirror to the textarea. A nice implementation of CodeMirror on MarkDown: http://jbt.github.io/markdown-editor/
Forget about my last comment, I was working on the highlight and I found marked (as your parser) can do this using highlightjs.
Put this somewhere on your script (make sure highlightjs and marked are loaded):
marked.setOptions({
sanitize: false,
highlight: function (code) {
return hljs.highlightAuto(code).value;
},
breaks: true
});
More info: https://github.com/chjj/marked#highlight