markdown-text-editor 0.0.4-beta.1 → 0.0.5-beta.1
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 +9 -7
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ import markdownEditor from "markdown-text-editor";
|
|
|
32
32
|
|
|
33
33
|
### Basic Example:
|
|
34
34
|
|
|
35
|
-
To initialize the Markdown editor, you need
|
|
35
|
+
To initialize the Markdown editor, you need to add `textarea` tag in your HTML and initialize the editor by passing the container's ID or class and options.
|
|
36
36
|
|
|
37
37
|
#### HTML:
|
|
38
38
|
```html
|
|
@@ -43,7 +43,7 @@ To initialize the Markdown editor, you need an empty container (like a `div`) in
|
|
|
43
43
|
```javascript
|
|
44
44
|
import markdownEditor from 'markdown-text-editor';
|
|
45
45
|
|
|
46
|
-
const editor = new markdownEditor('editor-container', {
|
|
46
|
+
const editor = new markdownEditor('.editor-container', {
|
|
47
47
|
placeholder: 'Write your markdown...',
|
|
48
48
|
toolbar: ['preview', 'bold', 'italic'], // Define the tools you want in the toolbar
|
|
49
49
|
});
|
|
@@ -57,7 +57,7 @@ You can specify which formatting options you want in the toolbar. The plugin sup
|
|
|
57
57
|
|
|
58
58
|
For example:
|
|
59
59
|
```javascript
|
|
60
|
-
const editor = new markdownEditor('editor-container', {
|
|
60
|
+
const editor = new markdownEditor('.editor-container', {
|
|
61
61
|
placeholder: 'Start writing...',
|
|
62
62
|
toolbar: ['bold', 'italic', 'strikethrough', 'preview'],
|
|
63
63
|
});
|
|
@@ -82,7 +82,7 @@ The toolbar can be customized to include the following options (you can add more
|
|
|
82
82
|
Example:
|
|
83
83
|
|
|
84
84
|
```javascript
|
|
85
|
-
const editor = new markdownEditor('editor-container', {
|
|
85
|
+
const editor = new markdownEditor('.editor-container', {
|
|
86
86
|
placeholder: 'Your markdown here...',
|
|
87
87
|
toolbar: ['preview', 'italic', 'bold'], // Shows italic first, then bold
|
|
88
88
|
});
|
|
@@ -106,7 +106,7 @@ const editor = new markdownEditor('editor-container', {
|
|
|
106
106
|
|
|
107
107
|
<script src="dist/markdown-editor-plugin.js"></script>
|
|
108
108
|
<script>
|
|
109
|
-
const editor = new markdownEditor('editor-container', {
|
|
109
|
+
const editor = new markdownEditor('.editor-container', {
|
|
110
110
|
placeholder: 'Type some markdown...',
|
|
111
111
|
toolbar: ['preview', 'bold', 'italic'] // Toolbar order: bold first, then italic
|
|
112
112
|
});
|
|
@@ -122,7 +122,7 @@ To use the plugin with Webpack, import the plugin and initialize it as shown bel
|
|
|
122
122
|
```javascript
|
|
123
123
|
import markdownEditor from 'markdown-editor';
|
|
124
124
|
|
|
125
|
-
const editor = new markdownEditor('editor-container', {
|
|
125
|
+
const editor = new markdownEditor('.editor-container', {
|
|
126
126
|
placeholder: 'Write markdown...',
|
|
127
127
|
toolbar: ['preview', 'bold', 'italic'], // Custom toolbar options
|
|
128
128
|
});
|
|
@@ -139,4 +139,6 @@ You can modify the appearance of the editor and toolbar using Tailwind utility c
|
|
|
139
139
|
|
|
140
140
|
If you're interested in improving this editor, I welcome contributions! Feel free to open issues or submit pull requests with bug fixes, features, or enhancements. Your contributions will help keep the project active and thriving.
|
|
141
141
|
|
|
142
|
-
Thank you for your support and consideration. Let’s continue to improve Markdown editing together!
|
|
142
|
+
Thank you for your support and consideration. Let’s continue to improve Markdown editing together!
|
|
143
|
+
|
|
144
|
+
## A Product of Nezanuha
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-text-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-beta.1",
|
|
4
4
|
"description": "A powerful, easy-to-use Markdown editor with a real-time preview, syntax highlighting. Ideal for developers, writers, and content creators who need a seamless, interactive writing experience with full Markdown support.",
|
|
5
|
-
"main": "dist/markdown-text-editor.js",
|
|
5
|
+
"main": "dist/markdown-text-editor.min.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "github",
|
|
8
8
|
"url": "git+https://github.com/nezanuha/markdown-text-editor.git"
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"postcss": "^8.4.47",
|
|
59
59
|
"postcss-loader": "^8.1.1",
|
|
60
60
|
"style-loader": "^4.0.0",
|
|
61
|
+
"terser-webpack-plugin": "^5.3.11",
|
|
61
62
|
"webpack": "^5.95.0",
|
|
62
63
|
"webpack-cli": "^6.0.1",
|
|
63
64
|
"webpack-dev-server": "^5.1.0"
|