 
         cm = CodeMirror.fromTextArea(elt.find("textarea")[0], opts)
         cm.save = @save
+        cm.task_id = task.task_id
         if editor_settings.bindings == 'vim'
             cm.setOption("vimMode", true)
 

        # (unless there are incoming sync updates to process).
        cm.on 'changes', underscore.debounce(sync_desc, 2000)

        cm.on 'focus', () ->
            currently_focused_editor = cm
            $(cm.getWrapperElement()).addClass('webapp-new-task-cm-editor-focus')

        cm.on 'blur', () ->
            $(cm.getWrapperElement()).removeClass('webapp-new-task-cm-editor-focus')
            currently_focused_editor = undefined

        cm.focus()
        if cursor_at_end

        e = task.element
        if not e?
            return
        cm = e.data('cm')
        if e.hasClass('webapp-task-editing-desc') and cm?
            cm.focus()
            cm.refresh()
            currently_focused_editor = cm
            return
        e.find(".webapp-task-desc").addClass('webapp-task-desc-editing')
        e.find(".webapp-task-toggle-icons").hide()
