Vue Showdown is a specialized Vue.js component that integrates the Showdown.js Markdown parser into Vue applications, allowing developers to render Markdown content directly within their templates. The current stable version is 4.2.0, compatible exclusively with Vue 3. Releases appear to follow a regular cadence, with minor and patch updates frequently following major versions. Its primary differentiation lies in providing a declarative and reactive Vue component wrapper for Showdown, simplifying Markdown rendering and supporting Showdown's extensive configuration options and extensions via component props. This approach abstracts away direct Showdown API calls, making it idiomatic for Vue development.
npm install vue-showdownVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the VueShowdown component in a Vue 3 application, including dynamic markdown content, Showdown options, and a custom inline extension for highlighting specific syntax.
For Vue 2 projects, change your dependency to `vue-showdown@^2`. For Vue 3 projects, ensure your Vue dependency is 3.x and update `vue-showdown` to its latest version.
Explicitly install the `showdown` package in your project: `npm install showdown` or `yarn add showdown`.
Update your component usage from `<VueShowdown :options="{ extensions: [myExt] }" />` to `<VueShowdown :extensions="[myExt]" />`. The `options` prop should only contain other Showdown configuration options.Ensure the script order is correct in your HTML: `<script src="https://unpkg.com/showdown/dist/showdown.min.js"></script><script src="https://unpkg.com/vue-showdown/dist/vue-showdown.min.js"></script>`.
For Vue 3, ensure you are globally registering the component using `app.component('VueShowdown', VueShowdown);` after importing it, and before mounting your application.Install `showdown` as a direct dependency in your project: `npm install showdown` or `yarn add showdown`.
Update your import statements from `const VueShowdown = require('vue-showdown');` to `import VueShowdown from 'vue-showdown';`.Verify that your project is indeed running Vue 3 and that `vue-showdown` is version 4.x. If using Vue 2, downgrade `vue-showdown` to a 2.x version.