Skip to content
Snippets Groups Projects
Commit 66025714 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Add MarkDown support

parent cc2a51a8
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ time, mark, audio, video {
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
// font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
......
......@@ -35,6 +35,15 @@ Template.chatMessageDashboard.helpers
# if $('#chat-window-' + this.rid + '.opened').length == 0
# return 'new'
preMD: Template 'preMD', ->
self = this
text = ""
if self.templateContentBlock
text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING)
text = text.replace(/#/g, '\\#')
return text
Template.chatMessageDashboard.events
'mousedown .edit-message': ->
self = this
......
......@@ -19,7 +19,7 @@
<textarea class="input-message-editing" contenteditable="true">{{{message}}}</textarea>
{{else}}
<p>
{{#emojione}}{{{message}}}{{/emojione}}
{{#emojione}}{{#markdown}}{{#preMD}}{{message}}{{/preMD}}{{/markdown}}{{/emojione}}
</p>
{{/if}}
{{/if}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment