add buttons for edit and preview mode