Why Picking a React Rich Text Editor Is Tricky
React rich text editors have a complicated history. Draft.js — Meta's editor framework — was deprecated in 2022. Quill has no official React wrapper and react-quill has React 18 compatibility problems. TinyMCE works with React but requires an API key and GPLv2 license that complicates commercial use.
Four criteria matter most in 2026: React 18 compatibility, official controlled component with value/onChange, full TypeScript types, and a license that permits commercial use.
React Rich Text Editor Comparison
| Editor | License | React 18 | Official | TypeScript | Output |
|---|---|---|---|---|---|
| RayEditor | MIT | ✓ | ✓ | Full .d.ts | HTML |
| TinyMCE | GPLv2/Paid | ✓ | ✓ | ✓ | HTML |
| Draft.js | MIT | Deprecated | N/A | Partial | ContentState |
| react-quill | MIT | Issues | Community | Partial | Delta JSON |
| CKEditor React | GPL/Paid | ✓ | ✓ | ✓ | HTML |
Installing RayEditor in a React Project
npm install @rohanyeole/ray-editor-react @rohanyeole/ray-editor
Basic React Component
import React from 'react';
import { RayEditor } from '@rohanyeole/ray-editor-react';
import '@rohanyeole/ray-editor/dist/ray-editor.css';
export default function App() {
const [content, setContent] = React.useState('<p>Hello world</p>');
return (
<RayEditor
value={content}
onChange={setContent}
options={{
placeholder: 'Start writing...',
toolbar: ['bold', 'italic', 'link', 'table', 'markdownToggle']
}}
/>
);
}
Next.js / SSR Usage
RayEditor is browser-only. Use dynamic import to avoid SSR errors in Next.js:
import dynamic from 'next/dynamic';
const RayEditor = dynamic(
() => import('@rohanyeole/ray-editor-react').then(m => m.RayEditor),
{ ssr: false }
);
Displaying Saved Content Without the Editor
Because RayEditor stores plain HTML you do not need to load the editor runtime to display saved content:
function Article({ html }) {
return <div dangerouslySetInnerHTML={{ __html: html }} />;
}
Key Options
toolbar— array of toolbar button keys to displayplaceholder— placeholder text shown when emptydarkMode—true | false | 'auto'readOnly— boolean, renders in preview modemaxHeight— string e.g.'400px'
Conclusion
For React projects in 2026, RayEditor is the best WYSIWYG rich text editor: MIT licensed, React 18 compatible, full TypeScript types, official wrapper, and clean HTML output. Draft.js is deprecated, react-quill has compatibility issues, and TinyMCE has a restrictive license. RayEditor is the modern, zero-dependency solution.