     if vm.saving_note == false
       # set status
       vm.saving_note = true
-      # get enml and title
+      # get enml and title FIXME get_enml_and_title_from_md() returns a promise!
       _enml_and_title = vm.get_enml_and_title_from_md(vm.get_md())
       enml = _enml_and_title['enml']
       title = _enml_and_title['title']

    processed_md = vm.md_pre_process(vm.get_md())
    _html_dom = $('<div></div>')
    _html_dom.html($window.marked(processed_md, {sanitize: true}))
    vm.html_post_process(_html_dom).then () ->
      jq_html_div.empty()
      jq_html_div.append(_html_dom)



  vm.get_enml_and_title_from_md = (md) ->
    html_div_hidden = $('#md_html_div_hidden')
    # return a promise
    return enmlRenderer.get_enml_and_title_promise(
      html_div_hidden,
      vm.render_html,
      md
    )

  # ------------------------------------------------------------------------------------------------------------------
  # Debugging methods
