Preview function for post edit