blob: e155b056bbdf1d2e2b09383899047ea3bff249a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Dumbymap
This library generate web maps from Semantic HTML, see [demo page](https://outdoorsafetylab.github.io/dumbymap/)
## Getting Started
Node.js:
```bash
npm install dumbymap
```
```js
import { markdown2HTML, generateMaps } from 'dumbymap'
// Create container element
const container = document.createElement('div')
document.body.append(container)
// Convert markdown text into Semantic HTML
markdown2HTML(container, '# Heading\n\n```map\nid: foo\nuse: Maplibre\n```\n')
// Gernerate maps from code block
generateMaps(container)
```
browser (CDN):
- [unpkg](https://unpkg.com/dumbymap@0.1.1/dist/dumbymap.mjs)
## TODOs
- Editor
- Better way to edit table in markdown
- `Ctrl-z` to resume last modificatioo
- Reduce fontawesome resources
- Add favicon
|