Skylar-Tech / node-red-contrib-matrix-chat

Matrix chat server support for Node-RED
GNU General Public License v3.0
32 stars 10 forks source link

Markdown to HTML #53

Open skylord123 opened 2 years ago

skylord123 commented 2 years ago

Would be awesome to support converting markdown to HTML.

matrix-react-sdk is what does the transformation on client's side before sending to the server. They are using the commonmark library.

This would be another option under the send message node called "Markdown to HTML" or just "Markdown".

justyns commented 10 months ago

FWIW I'm using the markdown node from https://flows.nodered.org/node/node-red-node-markdown and it's working okay. I'd love to see the send message node have a config option like "convert markdown to html" and handle it transparently though.

skylord123 commented 7 months ago

@justyns I needed some markdown2html conversion done for one of my other projects and so I created this function node: https://gist.github.com/skylord123/0ec487dc3259f73e11da597eb6d1d495

It's basically the code from matrix-react-sdk ported over so it should be pretty accurate. Let me know how it works out and if it goes well we can get it implemented over here.