Planning to implement MarkDown Preview UI + Markdown Support for a chat application in development.
Web framework is python-tornado
MarkDown Lib i am looking is : remarkable (Faster than commonmark but follows commonmark specs)
For serverside Commonmark Ref implementation .
###Advantages :
-
For clientside : we can do Syntax highlighting , live preview Markdown editor , like this : http://jbt.github.io/markdown-editor/
-
For serverside - It gives security
###Things i need:
- clientside security implications of unsafe html ( attacker can just make a http post to bypass markdown preview editor and inject )
- Server Side performance of Markdown rendering or Markdown Verification
- Scalablity due to that i am implementing markdown enabled
- Syntax Highlighting (Commonmark dosen’t support it)
What will be the optimum for both User Experience , Server performance and Security ?
- Client side Preview + Rendering with Server side verification (But server side verification will take about same performace as rendering? , Will it verify syntax highlighted results ? )
- Client Side (Just preview) with server side Rendering (Performance issue , need to plug syntax highlight (pygments) to commonmark.
- Client Side both rendering and Preview , nothing at server side (No Security at all, Highest performance , sytaxhighlight support) .