 
     # sync scroll
     scrollSyncor.syncScroll(vm.ace_editor, $('#md_html_div'))
+
+    # make new note
+    noteManager.make_new_note().then(
+      (note) =>
+        console.log('New note made: ' + JSON.stringify(note))
+        vm.note.guid = note.guid
+        vm.note.title = note.title
+        vm.set_md(note.md)
+      (error) =>
+        alert('make_new_note() failed!')
+    )
 
     # get note list
     vm.refresh_all_notes()

    return new Promise (resolve, reject) =>
      resolve(@db_server.notes.query().all().execute())

  delete_note: (guid) =>
    console.log('delete_note(' + guid + ') invoked')
    return @find_note_by_guid(guid).then(

# Service: noteManager
# ----------------------------------------------------------------------------------------------------------------------
markever.factory 'noteManager',
['uuid2', 'dbProvider', 'apiClient', 'imageManager',
(uuid2, dbProvider, apiClient, imageManager) -> new class NoteManager

  # Status of a note:
  # 1. new: note with a generated guid, not attached to remote
