Scylla/static/js/markdown.js

10 lines
273 B
JavaScript

function setupMarkdownPorts(app) {
app.ports.requestMarkdownPort.subscribe(function(data) {
app.ports.receiveMarkdownPort.send({
"roomId" : data.roomId,
"text" : data.text,
"markdown" : marked(data.text)
});
})
}