 
   startEditing = (evt) ->
     evt.preventDefault()
-    edit data
+    edit currentContent
     $editor.off 'dblclick', startEditing
     false
 

  metaKeyName = 'Ctrl'
  metaKeyName = 'Cmd'  if /^Mac/.test navigator.platform

  getContent = () ->
    if $editorCode[0].innerText?
      $editorCode[0].innerText
    else
      content = $editorCode[0].innerHTML
      content = content.replace /<br>/gi, '\n'
      he.decode content

  setContent = (content) ->
    if $editorCode[0].innerText?
      $editorCode[0].innerText = content
    else
      content = content.replace


    [filename, language] = filename.split '.'

    done = (body, status, xhr) ->
      currentContent = body
      if language?
        try
          high = hljs.highlight language, currentContent
        catch e
          high = {value: currentContent}
      else
        high = hljs.highlightAuto currentContent
        if high.language?
          window.location.hash = "#{filename}.#{high.language}"
          return
