       method
       url
       contentType: 'application/octet-stream'
-      data
+      data: currentContent
     }).always(always).done(done).fail(fail)
     false
 
   edit = (content) ->
-    content ?= getContent()
+    content ?= getDomContent()
     $linenosCode.html "#{metaKeyName}+s to Save - Shift+#{metaKeyName}+s to Save As...".replace /(.)/g, '$1<br>'
     $editorCode.html(content).attr('contentEditable', 'true').focus()
     $editor.addClass('editing')


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


    $(window).on 'keydown', maybeSave

  lock = (content, lines = []) ->
    content ?= getDomContent()
    if Array.isArray lines
      if lines.length is 0
        linenosCount = content.split('\n').length
