   return {
     get_enml_and_title_promise : get_enml_and_title_promise
     get_title_promise: get_title_promise
+    render_html: render_html
   }
 ]
 

        console.log('no valid previous current note found. create new note')
        noteManager.make_new_note().then(
          (note) =>
            vm.change_current_note(guid=note.guid, title=note.title, md=note.md)
            console.log('New note made: ' + JSON.stringify(note))
          (error) =>
            alert('make_new_note() failed!')
        ).catch (error) => alert('make new note failed!')
    p.catch (error) => alert('load previous current note failed')

    # get note list
    vm.refresh_all_notes()

    # set markdown (single direction updating)
    vm.set_md(vm.ace_editor.getValue())
    # TODO optimize performance
    enmlRenderer.render_html($('#md_html_div'), vm.get_md()).catch (error) => alert('render error: ' + error)

  # ------------------------------------------------------------------------------------------------------------------
  # Operations for notes
