Skip to content

Commit

Permalink
Katex formatting tip (#3066)
Browse files Browse the repository at this point in the history
* add katex formatting tip when katex and formatting tips are both on

* it's RocketChat.katex, not RocketChat.Katex

* link to KaTeX website. moved to a more logical location in formatting tips
  • Loading branch information
mccambridge authored and engelgabriel committed Apr 28, 2016
1 parent 3a9b19b commit 5dc607d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/rocketchat-ui-message/message/messageBox.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Template.messageBox.helpers
return roomData.name
showMarkdown: ->
return RocketChat.Markdown
showKatex: ->
return RocketChat.katex
showFormattingTips: ->
return RocketChat.settings.get('Message_ShowFormattingTips') and (RocketChat.Markdown or RocketChat.Highlight)
return RocketChat.settings.get('Message_ShowFormattingTips') and (RocketChat.Markdown or RocketChat.Highlight or RocketChat.Katex)
canJoin: ->
return !! ChatRoom.findOne { _id: @_id, t: 'c' }
subscribed: ->
Expand Down
4 changes: 3 additions & 1 deletion packages/rocketchat-ui-message/message/messageBox.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@
{{#if showHighlight}}
<code class="inline"><span class="hidden-br"><br></span>```<span class="hidden-br"><br></span><i class="icon-level-down"></i>{{_ "multi"}}<span class="hidden-br"><br></span><i class="icon-level-down"></i>{{_ "line"}}<span class="hidden-br"><br></span><i class="icon-level-down"></i>```</code>
{{/if}}
{{#if showKatex}}
<span><a href="https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX" target="_blank">\[KaTeX\]</a></span>
{{/if}}
{{#if showMarkdown}}
<q><span class="hidden-br"><br></span>&gt;{{_ "quote"}}</q>
{{/if}}

</div>
{{/if}}
<div class="editing-commands" aria-hidden="true" dir="auto">
Expand Down

0 comments on commit 5dc607d

Please sign in to comment.