1.1.8 • Published 7 months ago
markdown-editor-rj v1.1.8
Markdown Message Editor
A lightweight, customizable Markdown editor for ReactJS and NextJS applications. This package provides a simple, intuitive interface for adding basic Markdown formatting to your text inputs, including bold, italic, strikethrough, unordered lists.
Features
- Bold: Wrap text with
**
to make it bold. - Italic: Wrap text with
_
to make it italic. - Strikethrough: Wrap text with
~
to strike through text. - Unordered List: Add
-
before each line to create an unordered list. - Lightweight: Optimized for performance, with minimal external dependencies.
Installation
To install the Markdown Editor package in your project, use npm
Full Example Usage
After installing the package, you can use it as follows:
import React, { useState } from 'react';
import MarkdownEditor from 'markdown-editor-rj'; // Import the MarkdownEditor component
import 'markdown-editor-rj/dist/style.css'; // Import the default CSS (if available)
const App = () => {
const [editorValue, setEditorValue] = useState('');
// Function to handle change in the editor value
const handleEditorChange = (newValue) => {
setEditorValue(newValue);
};
return (
<div>
<h1>Markdown Editor Example</h1>
{/* Markdown Editor Component */}
<MarkdownEditor
handleChange={handleEditorChange} // Pass the handleChange function
placeholder="Start typing your markdown here..." // Optional: placeholder text
/>
</div>
);
};
export default App;
1.1.8
7 months ago
1.1.7
7 months ago
1.1.6
7 months ago
1.1.5
7 months ago
1.1.4
7 months ago
1.1.3
7 months ago
1.1.2
7 months ago
1.1.1
7 months ago
2.0.1
7 months ago
2.0.0
7 months ago
1.0.9
7 months ago
1.0.8
7 months ago
1.0.7
7 months ago
1.0.6
7 months ago
1.0.5
7 months ago
1.0.4
7 months ago
1.0.3
7 months ago
1.0.2
7 months ago
1.0.1
7 months ago
1.0.0
7 months ago