π Major Update: All GitHub issues have been implemented! This release includes comprehensive feature enhancements with markdown support, file uploads, whiteboard functionality, font switching, and underline formatting.
- Bold, Italic, and Underline support
- Font size adjustment with custom size input
- Font family switching (20+ built-in fonts)
- Text color picker
- Undo/Redo functionality
- Import markdown files directly
- Export content as markdown (copy to clipboard)
- Support for headers, emphasis, code, and more
- Real-time markdown syntax conversion
- Drag & drop file upload
- Click-to-upload button
- Image embedding with preview
- File attachments for documents
- Multi-file support
- π Server-side upload support with cloud storage integration
- π Environment variable configuration for easy deployment
- π Multiple cloud provider support (AWS, GCP, Azure, Cloudinary)
- π Upload progress tracking and error handling
- π Automatic fallback to base64 if server upload fails
- Professional diagramming and sketching tools
- Complete Excalidraw interface with shapes, text, and arrows
- Vector-based drawings with hand-drawn aesthetic
- SVG export and high-quality PNG embedding
- Perfect for flowcharts, wireframes, and visual diagrams
- Theme-synced (light/dark) with your app
- Responsive, isolated modal to prevent CSS collisions
- Built-in dark/light mode
- Automatic theme detection
- High contrast accessibility
- Consistent styling across all features
- Editor content and Excalidraw auto-sync with theme
npm install @kel-app/rte- React 18+ (React 19 recommended)
- Tailwind CSS 4.1+
- Next.js (more frameworks coming soon)
App Router (Next.js 13+):
"use client";
import { RTE } from "@kel-app/rte";
import "@kel-app/rte/dist/index.css";
export default function MyEditor() {
return <RTE themeSwitch={true} />;
}With Server Upload (Recommended for Production):
"use client";
import { RTE, createCloudStorageConfig } from "@kel-app/rte";
import "@kel-app/rte/dist/index.css";
const uploadConfig = createCloudStorageConfig('aws', {
uploadUrl: process.env.NEXT_PUBLIC_UPLOAD_URL,
apiKey: process.env.NEXT_PUBLIC_API_KEY,
});
export default function MyEditor() {
return (
<RTE
themeSwitch={true}
enableServerUpload={true}
uploadConfig={uploadConfig}
onFileUploadSuccess={(url, file) => {
console.log('File uploaded:', file.name, 'to', url);
}}
/>
);
}Pages Router (Next.js 12):
// _app.tsx
import "@kel-app/rte/dist/index.css";
// YourComponent.tsx
("use client");
import { RTE } from "@kel-app/rte";
export default function MyEditor() {
return <RTE themeSwitch={true} />;
}"use client";
import { RTE } from "@kel-app/rte";
export default function StandaloneEditor() {
return (
<div className="h-screen">
<RTE themeSwitch={true} />
</div>
);
}"use client";
import { RTE } from "@kel-app/rte";
export default function IntegratedEditor() {
return (
<div className="h-96 border rounded-lg">
<RTE themeSwitch={false} />
</div>
);
}"use client";
import { RTE } from "@kel-app/rte";
export default function EditorWithContent() {
const defaultContent = "# Welcome\nStart typing here...";
return <RTE themeSwitch={true} defaultValue={defaultContent} />;
}| Feature | Status | Description |
|---|---|---|
| Bold/Italic | β | Classic text formatting |
| Underline | β | Underline text support |
| Font Switching | β | 20+ font families |
| Font Sizing | β | Preset + custom sizes |
| Color Picker | β | Full color selection |
| Markdown Import | β | Load .md files |
| Markdown Export | β | Copy as markdown |
| File Upload | β | Drag & drop support |
| Image Embedding | β | Inline image preview |
| Whiteboard | β | Drawing & sketching |
| Undo/Redo | β | Full history support |
| Dark Mode | β | Automatic theming |
| Mobile Support | β | Responsive design |
Add custom fonts by editing src/components/utils/fonts.ts:
export const availableFonts = [
{ name: "Custom Font", value: "CustomFont, sans-serif" },
// ... existing fonts
];The editor respects your existing theme setup. Use next-themes or any theme provider:
import { ThemeProvider } from "next-themes";
export default function App({ children }) {
return (
<ThemeProvider attribute="class" defaultTheme="system">
{children}
</ThemeProvider>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
themeSwitch |
boolean |
Required | Show theme toggle button |
defaultValue |
string |
"" |
Initial editor content |
The editor handles all interactions internally. For advanced use cases, access the ProseMirror instance directly.
npm testnpm run buildnpm run devImportant: From v0.1.0-alpha.3.2, the
RTEcomponent requires the boolean propthemeSwitch. Set it explicitly (true to show the switcher; false for integrated usage that adopts the parent theme).
- Features Guide - Comprehensive feature documentation
- Server Upload Guide - Complete server upload configuration
- Changelog - Version history and updates
- Contributing Guide - How to contribute
- API Reference - Complete API documentation
- Files stored as base64 by default (server upload now available for production)
- Some mobile touch interactions could be improved
- Excalidraw advanced options (e.g., libraries, collaboration) are not yet wired into the UI
-
Server-side file upload integrationβ Completed - Advanced whiteboard tools (shapes, text, layers)
- Extended markdown support (tables, footnotes)
- Plugin system for custom extensions
- Real-time collaboration features
We welcome contributions! Here's how you can help:
- Report Bugs: Open an issue with detailed reproduction steps
- Suggest Features: Share your ideas in GitHub Discussions
- Submit PRs: Fork, branch, code, test, and submit pull requests
- Improve Docs: Help us improve documentation and examples
git clone https://github.com/Kel-app/RTE.git
cd RTE
npm install
npm run dev # Start development server
npm run build # Build for production
npm test # Run testsWe've created a comprehensive development environment for testing all features:
- Start Development Server:
npm run dev - Open Browser: Visit
http://localhost:3000 - Test All Features: Complete testing environment with sample content
The development environment includes:
- β Live Preview: Real-time testing of all RTE features
- β Theme Testing: Switch between light/dark themes
- β Sample Content: Pre-loaded content for feature testing
- β Hot Reloading: Instant updates during development
Comprehensive test suite covering:
- β Component Rendering: All editor components and functionality
- β Text Formatting: Bold, italic, underline, fonts, colors
- β File Operations: Upload, embed, and file handling
- β Markdown Support: Import/export and conversion testing
- β Theme Integration: Theme switching and consistency
For detailed testing information, see TESTING.md.`
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Community support and ideas
- Documentation: Full feature documentation
- Built with ProseMirror - Excellent rich text editing toolkit
- UI components from Radix UI and Lucide React
- Styling powered by Tailwind CSS
- Icons by Lucide
Made with β€οΈ by the Kel-app team
β Star us on GitHub if this project helped you!