miaolz123 / vue-markdown

A Powerful and Highspeed Markdown Parser for Vue
https://miaolz123.github.io/vue-markdown/
MIT License
1.89k stars 257 forks source link

An enhancement to the docs #11

Closed brianbancroft closed 7 years ago

brianbancroft commented 7 years ago

Hi there,

Thanks again for making this library. I was able to make this work exactly as advertised through a vue-cli-generated express template, but it took me a few tries as a junior developer, and I'd love to add some more content to the docs to help the 'me who first looked at this library' figure out its use on the first try.

Here's how I got the library to work. First, I had to figure out to put the setup in the .vue. component that ingests the markdown. It was confusing initially as for the most part, I've been declaring the libraries in a main.js file which handles the initial bits (Declaring Vue, vue-resource, vue-router and so forth).

The good news is that the code block you mentioned for the ES6 setup works for me:

  import VueMarkdown from 'vue-markdown'
    components: {
      VueMarkdown
    }

It may be subject to change, but the working code is here.

Anyways, I'd love to tweak the readme a bit further so that if another me comes along, he or she'd get it working on the first try :)

If you have a suggestion on how I could use this if I'm not using this properly, I'd love to give it a shot as well.

Best wishes!

miaolz123 commented 7 years ago

I am sorry to reply this issue now and the document does have a lot of missing content.

PR is welcome anytime!