1.0.2 • Published 1 year ago

webrouk-markdown-body v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

webroukMarkdownBody

Webrouk Markdown Body is a native JavaScript markdown-to-html web component to load and display markdown files.

Demo


CodePen Example

Installation


Use NPM to download and install it directly in to your project

$ npm install webrouk-markdown-body --save

or include js file manually

<!-- webrouk-markdown-body component file -->
<script src="webrouk-markdown-body.js"></script>

Usage


Using webroukMarkdownBody is simple.

<webrouk-markdown-body src="https://raw.githubusercontent.com/twbs/bootstrap/main/README.md" mode="light"></webrouk-markdown-body>

Options

OptionTypeDescriptionDefault
srcurl | pathLoads and displays an external MD filenull
default# Hello World!Default message if there is no contentnull
modelight | darkChooses the color mode to be appliednull

Write markdown inline


You can pass in your markdown inline too.

<webrouk-markdown-body mode="dark">
  <textarea>
    - **item one**
    - _item two_
    - [x] item three
    - [Google](https://www.google.com/)
    - [YouTube](https://www.youtube.com/)
  </textarea>
</webrouk-markdown-body>

License


webroukMarkdownBody is licensed MIT. It can be used for free and without any attribution, in any personal or commercial project.