A custom rich text editor built with React and Vite using contentEditable
, supporting formatting, emoji picker, and customizable toolbar options.
- Bold, italic, underline, strikethrough
- Text color and highlight
- Emoji picker (powered by
emoji-picker-react
) - Text alignment (left, center, right)
- Link insertion
- Image embedding (via URL)
- Clean formatting toolbar
- Lightweight and fast (Vite-built)
npm install react-custom-text-editor
import React from 'react';
import ReactCustomTextEditor from 'react-custom-text-editor';
const App = () => {
const handleChange = (html) => {
console.log('Editor content:', html);
};
return (
<div>
<h2>My Custom Editor</h2>
<ReactCustomTextEditor
initialValue="<p>Hello Ritu 🌸</p>"
onChange={handleChange}
placeholder="Start typing here..."
/>
</div>
);
};
export default App;