1.1.0 • Published 1 month ago

vue-markdown-wrapper v1.1.0

Weekly downloads
-
License
Copyright (c) 202...
Repository
github
Last release
1 month ago

Vue Markdown component based on marked library 📚📙

CodeQL Codacy Badge Known Vulnerabilities

Install

yarn add vue-markdown-wrapper
# - or -
npm install vue-markdown-wrapper

Usage Example

<template>
    <div>
        <VueMarkdown :md="this.md"></VueMarkdown>
    </div>
</template>

<script lang="ts">
import { VueMarkdown } from 'vue-markdown-wrapper';
export default defineComponent({
    data() {
        return {
            md: null,
        };
    },
    async mounted() {
        // FETCH MARKDOWN SAMPLE
        const __md = await (await fetch('/sample01.md')).text();
        this.md = __md as any;
    },
});
</script>

Results

Component Props

Key NameRequiredExampleDefault ValueDescription
mdYes__hello__nullThe markdown text
silentNotrue \| falsefalseIf true, the parser does not throw any exception or log any warning. Any error will be returned as a string.
breaksNotrue \| falsefalseIf true, add on a single line break
gfmNotrue \| falsetrueUse approved Github Flavored
pedanticNotrue \| falsefalseConform to the original markdown.pl

Contributing to this project

PRs and Issues are welcome. 😘

License

Copyright © thewolfx41 - Released under the MIT License.

1.1.0

1 month ago

1.0.1

3 months ago

1.0.0

9 months ago