A powerful, extensible, and beautiful rich text editor for React with TypeScript support.
- π¨ Beautiful UI - Modern, clean interface with light and dark themes
- π Extensible Plugin System - Easy to create and integrate custom plugins
- π± Fully Responsive - Works seamlessly on all screen sizes
- π― TypeScript Support - Full type definitions included
- βοΈ React 18+ Compatible - Built for modern React applications
- π Dark Mode - Built-in theme switching support
- π Pure CSS - No external CSS framework required (33% smaller bundle)
- π Link Insertion - Beautiful modal interface for adding links
- π₯ Video Embedding - Easy YouTube & Vimeo video embedding
- ποΈ View Source - Toggle between visual and HTML source code modes
- π Debug Console - Advanced debugging tools for development
- β‘ Next.js Ready - Perfect integration with Next.js
- π¦ Lightweight - Minimal dependencies, optimized bundle size
- β¨ Smart Toolbar - Real-time active state detection for all buttons
- β‘ High Performance - Optimized typing experience with zero lag
npm install @akincand/react-editorimport { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
return (
<Editor
plugins={defaultPlugins}
placeholder="Start typing..."
onChange={(content) => console.log(content)}
/>
);
}For complete documentation, examples, and guides, visit:
π https://kuardscreative.gitbook.io/react-editor
| Prop | Type | Default | Description |
|---|---|---|---|
plugins |
EditorPlugin[] |
[] |
Array of plugins to enable |
placeholder |
string |
"Start typing..." |
Placeholder text |
theme |
{ mode: 'light' | 'dark' } |
{ mode: 'light' } |
Editor theme |
showSourceButton |
boolean |
false |
Show HTML source toggle |
debugConsole |
boolean |
false |
Enable debug logging |
onChange |
(content: string) => void |
- | Content change handler |
onReady |
(editor: EditorInstance) => void |
- | Editor ready callback |
See full API documentation β
import {
basicFormattingPlugin, // Bold, Italic, Underline, Strikethrough
headingsPlugin, // H1, H2, H3, Paragraph
listsPlugin, // Bullet and numbered lists
alignmentPlugin, // Text alignment
linksPlugin, // Links with modal interface
videoPlugin, // YouTube & Vimeo video embedding
defaultPlugins // All plugins combined
} from '@akincand/react-editor';- Basic Formatting: Bold, Italic, Underline, Strikethrough
- Headings: H1, H2, H3, Paragraph
- Lists: Bullet List, Numbered List
- Alignment: Left, Center, Right, Justify
- Links: Modal-based link insertion with custom text
- Videos: Responsive video embedding (YouTube & Vimeo)
- Images: Image insertion with URL, alt text, and custom dimensions
- Colors: Text and background color selection with color picker
<Editor
theme={{ mode: 'dark' }}
plugins={defaultPlugins}
/><Editor
plugins={defaultPlugins}
showSourceButton={true} // Enable HTML source viewer
/><Editor
plugins={defaultPlugins}
debugConsole={true} // Enable debug logging
/>'use client';
import { Editor, defaultPlugins } from '@akincand/react-editor';
export default function EditorPage() {
return (
<Editor
plugins={defaultPlugins}
theme={{ mode: 'dark' }}
/>
);
}import { EditorPlugin } from '@akincand/react-editor';
const myPlugin: EditorPlugin = {
name: 'myPlugin',
version: '1.0.0',
onLoad: (context) => {
console.log('Plugin loaded!');
}
};
<Editor plugins={[...defaultPlugins, myPlugin]} />Contributions are welcome! Please read our Contributing Guide for details.
MIT Β© AkincanD
- Documentation: https://kuardscreative.gitbook.io/react-editor
- npm Package: https://www.npmjs.com/package/@akincand/react-editor
- GitHub: https://github.com/AkincanD/react-editor
- Issues: https://github.com/AkincanD/react-editor/issues
If you find this project helpful, please give it a βοΈ on GitHub!
Made with β€οΈ by AkincanD