Because of the fact that we want to lazy load the markdown library, it probably makes sense to create 2 separate `renderTextPreview` and `renderMarkdownPreview` functions.