Toggle preview button

When the user enters or exits Preview mode, the "Preview" button reacts to that change and toggles between a Preview and Write button