new function for previewving markdown