unplugin / unplugin-vue-markdown

Compile Markdown to Vue component
MIT License
508 stars 27 forks source link

How to use as just a component and render a markdown string? #28

Closed douglasg14b closed 1 year ago

douglasg14b commented 1 year ago

https://github.com/JanGuillermo/vue3-markdown-it points to here, but I'm not seeing the parity?

Can this do:

<template>
  <div>
    <Markdown :source="source" />
  </div>
</template>

<script>
import Markdown from 'vue3-markdown-it';

export default {
  components: {
    Markdown
  },
  data() {
    return {
      source: '# Hello World!'
    }
  }
}
</script>
antfu commented 1 year ago

No they are different. This is a pure compile-time plugin and does not handle runtime transforamtion.