Skip to content

Commit

Permalink
Update README with github page links
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyo committed Jun 14, 2022
1 parent 22d013e commit 7cd1f1c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,42 @@

*A simple wrapper around [showdown](https://github.com/showdownjs/showdown/)'s markdown parser, in the form of a web-component.*

## Instructions

* Download [mark-down.js](mark-down.js) and [use-showdown.js](use-showdown.js)

* Import/Include module:
### Import/Include module

`<script src="mark-down.js" type="module">`
```html
<script type="module" src="https://tomyo.github.io/mark-down/mark-down.js" >
```
### Usage
* Declarative
```html
<mark-down>
<mark-down>
# Some title
...
A paragraph
* A
* List
</mark-down>
</mark-down>
```
* Imperative
`document.querySelector('mark-down').innerHTML = "#whatever ..."`
```js
document.querySelector('mark-down').innerHTML = `
# Some title
...
A paragraph
* A
* List
`
```
### More info
* [Demo](./demo.html)
* [Tests](./tests/shouldParseMD.html)
* [Github](https://github.com/tomyo/mark-down)
* Some [Tests](tests/shouldParseMD.html) (summary shown in console).

* Code is simple, read it :)
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<meta lang="en" />

<script async src="mark-down.js" type="module"></script>
<script async src="https://tomyo.github.io/mark-down/mark-down.js" type="module"></script>

<h1>Demo</h1>

Expand Down

0 comments on commit 7cd1f1c

Please sign in to comment.