   'click .foldButton': (e, t) ->
     e.preventDefault()
     e.stopPropagation()
-    t.folded.set not t.folded.get()
+    messageFolded.set @_id, not messageFolded.get @_id
 
   'click .rawButton': (e, t) ->
     e.preventDefault()
     e.stopPropagation()
-    t.raw.set not t.raw.get()
+    messageRaw.set @_id, not messageRaw.get @_id
 
   'click .editButton': (e, t) ->
     e.preventDefault()

  published: historify 'published'

  tex2jax: ->
    history = Template.instance().history.get() ? @
    if history.format in mathjaxFormats
      'tex2jax'
    else
      ''
  title: historify 'title'
  formatTitle: ->
    history = Template.instance().history.get() ? @
    title = history.title
    return title unless title
    if Template.instance().raw.get()
      "<CODE CLASS='raw'>#{_.escape title}</CODE>"
    else
      title = formatTitle history.format, title

      #editor.setOption 'spellcheck', true

  keyboard: ->
    capitalize messageKeyboard.get(@_id) ? defaultKeyboard
  activeKeyboard: (match) ->
    if (messageKeyboard.get(@_id) ? defaultKeyboard) == match
      'active'
    else
      ''
