Vue Simple Markdown is a lightweight and performant Markdown parsing component specifically designed for Vue.js 2 applications. Currently at version 1.1.5, the package's last publish was 5 years ago, indicating it is no longer actively maintained but remains stable for existing Vue 2 projects. It provides a `<vue-simple-markdown>` component that accepts a `source` prop containing Markdown text and renders it as HTML. Its key differentiators include highly configurable parsing options via numerous boolean props (e.g., `emoji`, `heading`, `highlight`, `table`, `lists`), allowing developers to enable or disable specific Markdown features. While it offers integration with `highlightjs` for syntax highlighting, `highlightjs` itself needs to be installed and managed by the user. The library focuses on simplicity and speed for transforming Markdown within Vue 2 environments.
npm install vue-simple-markdownVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install, globally register, and use the `<vue-simple-markdown>` component with various props to render a markdown string in a Vue 2 application.
For Vue 3 projects, consider alternatives like `vue-markdown-render`, `markdown-it`, or `marked.js` combined with a custom component.
Add `import 'vue-simple-markdown/dist/vue-simple-markdown.css'` to your main JavaScript file (e.g., `main.js` or `app.js`) or import it into your global CSS/SCSS.
Install `highlight.js` (e.g., `npm install highlight.js`), import its styles and core library, and potentially register it as a Vue directive or use a wrapper component if needed.
For new projects or those requiring active maintenance and modern features, consider more current Vue 2 or Vue 3 compatible Markdown rendering libraries.
Ensure `import VueSimpleMarkdown from 'vue-simple-markdown'; Vue.use(VueSimpleMarkdown);` is called once in your application's entry point, or add `components: { VueSimpleMarkdown }` to your Vue component's options.Verify `npm install vue-simple-markdown` completed successfully and ensure the CSS import path `import 'vue-simple-markdown/dist/vue-simple-markdown.css'` is correct in your main JS/TS file.
Install `highlight.js`, import its main script and a theme CSS (e.g., `import 'highlight.js/styles/github.css'; import hljs from 'highlight.js';`), and ensure `highlight.js` is properly integrated to process code blocks rendered by the markdown component.