markdown-text-editor 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/dist/markdown-text-editor.es.js +437 -441
- package/dist/markdown-text-editor.es.js.map +1 -1
- package/dist/markdown-text-editor.min.js +47 -46
- package/dist/markdown-text-editor.min.js.map +1 -1
- package/dist/markdown-text-editor.umd.js +47 -46
- package/dist/markdown-text-editor.umd.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -37,19 +37,27 @@ Most JavaScript markdown editors (EasyMDE, SimpleMDE, CodeMirror-based editors)
|
|
|
37
37
|
|
|
38
38
|
## 🚀 Quick Start
|
|
39
39
|
|
|
40
|
-
###
|
|
40
|
+
### NPM (bundlers: Vite, webpack, Rollup, etc.)
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
npm install markdown-text-editor
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
```javascript
|
|
47
|
+
import MarkdownEditor from 'markdown-text-editor';
|
|
48
|
+
new MarkdownEditor('#markdown-editor');
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### CDN: ES module
|
|
47
52
|
|
|
48
53
|
```html
|
|
49
|
-
<script
|
|
54
|
+
<script type="module">
|
|
55
|
+
import MarkdownEditor from 'https://cdn.jsdelivr.net/npm/markdown-text-editor/dist/markdown-text-editor.es.js';
|
|
56
|
+
new MarkdownEditor('#markdown-editor');
|
|
57
|
+
</script>
|
|
50
58
|
```
|
|
51
59
|
|
|
52
|
-
###
|
|
60
|
+
### CDN: global script tag (IIFE)
|
|
53
61
|
|
|
54
62
|
```html
|
|
55
63
|
<form method="post" action="/submit">
|
|
@@ -57,12 +65,14 @@ npm install markdown-text-editor
|
|
|
57
65
|
<button type="submit">Save</button>
|
|
58
66
|
</form>
|
|
59
67
|
|
|
68
|
+
<script src="https://cdn.jsdelivr.net/npm/markdown-text-editor"></script>
|
|
60
69
|
<script>
|
|
61
|
-
import MarkdownEditor from "markdown-text-editor";
|
|
62
70
|
new MarkdownEditor('#markdown-editor');
|
|
63
71
|
</script>
|
|
64
72
|
```
|
|
65
73
|
|
|
74
|
+
**Via CDN**: no import needed, `MarkdownEditor` is available globally.
|
|
75
|
+
|
|
66
76
|
That's it. Form submission, `.value` access, and all native textarea behaviour work exactly as before.
|
|
67
77
|
|
|
68
78
|
## ✨ Features
|
|
@@ -160,7 +170,7 @@ Contributions are welcome! Bug fixes, feature requests, and improvements — ope
|
|
|
160
170
|
|
|
161
171
|
If this saves you time, consider giving it a star — it helps others find this project!
|
|
162
172
|
|
|
163
|
-
[](https://github.com/nezanuha/markdown-text-editor
|
|
173
|
+
[](https://github.com/nezanuha/markdown-text-editor)
|
|
164
174
|
|
|
165
175
|
---
|
|
166
176
|
|