Created a Document Listener that triggers an event every time anything is type (will be used for the autosave).