Inline Edit: Confirm discard of edits

Initially disable the Save button until after changes are made.
Use the CodeMirror4 edit system to track the mutation, allowing
the Save button to re-disable after using undo.

If the document is dirty, popup the standard Javascript window
to ask if its OK to discard edits. On Cancel return back to the
editor to allow saving, or to continue editing.

Change-Id: Ic43e82fe083de4da9e9985ef12a3752bdb9d9928
5 files changed