add markdown-preview function