   delayedResize: ->
     setTimeout @resize, 0
 
+  startEdit: =>
+    @narrative.set('editing', true)
+    @render()
+
   onClose: ->
 
 

    return @

  saveNarrative: (event) =>
    @narrative.set('title', "title")
    @narrative.set('content', 
      @$el.find('.content-text-field').val().replace(/^\s+|\s+$/g, ''))
    @narrative.save()

  # Following 2 methods are used for dynamically resize the textarea.


  events:
    "click .save-narrative": "saveNarrative"
    "click .content-text": "startEdit"
    # textarea resize-related events
    "change textarea.content-text-field": "resize"
    "cut textarea.content-text-field": "delayedResize"
