Added functionality to preview a post before submitting it