Skip to content

React

React WYSIWYG editor — lightweight, SSR-safe, free

@liteeditor/react wraps LiteEditor, a ~41 KB vanilla JS rich text editor, in a small React component. Tables, images, media, code samples and a menubar out of the box — and guarded init makes it Next.js-ready.

~2 KB
React wrapper
gzipped
~41 KB
editor core
JS + CSS, zero deps
13
plugins included
tables, media, code…
SSR
safe
Next.js ready

Step 1

Install the React rich text editor

bash
npm install @liteeditor/react @liteeditor/editor

Step 2

Use it — React, Next.js, and the ref API

jsx
import { useRef } from 'react';
import { Editor } from '@liteeditor/react';

export default function PostForm() {
  const editorRef = useRef(null);

  const save = () => {
    const html = editorRef.current?.getContent();
    // send html to your API
  };

  return (
    <>
      <Editor
        ref={editorRef}
        apiKey="YOUR_API_KEY"
        value="<p>Hello <strong>React</strong>!</p>"
        height={320}
        menubar
        plugins="all"
        toolbar="full"
      />
      <button onClick={save}>Save</button>
    </>
  );
}

Uncontrolled by design

value seeds the initial HTML; read the current document with ref.getContent() when you save. A controlled pattern that re-renders rich text on every keystroke causes cursor jumps and slows large documents, so the component intentionally doesn't do that. Reactive prop changes after mount don't re-initialize the editor — use setContent() instead.

Live

The same editor, live

This is the editor the React component renders — try the menubar, insert a table, paste from Word.

Loading editor…

React TinyMCE alternative

Lighter than TinyMCE, CKEditor and Quill for React

Bundle
Others
TinyMCE React: ~200 KB+ core
LiteEditor
~41 KB editor + ~2 KB wrapper
Tables & media
Others
Quill React: third-party modules
LiteEditor
Included in core
Setup
Others
CKEditor React: build/config step
LiteEditor
npm install, drop the component in

Full TinyMCE comparison →

FAQ

React WYSIWYG editor FAQ

LiteEditor's @liteeditor/react component gives React apps a ~41 KB gzipped WYSIWYG editor with tables, images, media embeds, code samples and a menubar included, plus a free lifetime plan — a lighter alternative to TinyMCE React or CKEditor React.

Also available: Next.js step-by-step guide · Vue 3 component

Add a lightweight WYSIWYG editor to your React app

Free lifetime plan · No credit card · localhost pre-approved for development

npm install @liteeditor/react @liteeditor/editor