# React Markdown editor libraries

React Markdown editor libraries add a writing surface to a React app that stores content as Markdown. An editor either shows the Markdown source beside a rendered preview or hides the syntax behind formatted text. These libraries let documentation tools, content dashboards, and note-taking apps keep user writing as portable plain text.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [@tiptap/react](#tiptap-react) | 112.3M | 39.1K | Nov 2026 | MIT |
| [@monaco-editor/react](#monaco-editor-react) | 38.6M | 4.8K | Feb 2025 | MIT |
| [@lexical/react](#lexical-react) | 30.7M | 24.0K | Oct 2026 | MIT |
| [@uiw/react-codemirror](#uiw-react-codemirror) | 27.3M | 2.3K | Sep 2026 | MIT |
| [@mdxeditor/editor](#mdxeditor) | 7.7M | 3.7K | Nov 2026 | MIT |
| [@uiw/react-md-editor](#uiw-markdown-editor) | 4.2M | 2.9K | Nov 2026 | MIT |
| [@blocknote/react](#blocknote-react) | 3.8M | 10.4K | Oct 2026 | MPL-2.0 |
| [@tinymce/tinymce-react](#tinymce-tinymce-react) | 3.3M | 1.1K | Oct 2026 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[@tiptap/react](#tiptap-react) has the most monthly downloads in this comparison, at 112.3M, a count that covers all its rich text editing.

## Capabilities

| Library | Formatted editing | Supplied toolbar |
| --- | --- | --- |
| [@tiptap/react](#tiptap-react) | Yes | No |
| [@monaco-editor/react](#monaco-editor-react) | No | No |
| [@lexical/react](#lexical-react) | Yes | No |
| [@uiw/react-codemirror](#uiw-react-codemirror) | No | No |
| [@mdxeditor/editor](#mdxeditor) | Yes | Yes |
| [@uiw/react-md-editor](#uiw-markdown-editor) | No | Yes |
| [@blocknote/react](#blocknote-react) | Yes | Via plugin |
| [@tinymce/tinymce-react](#tinymce-tinymce-react) | Yes | Yes |

## Libraries

### @tiptap/react

[GitHub](https://github.com/ueberdosis/tiptap) · [npm](https://www.npmjs.com/package/@tiptap/react) · [Docs](https://tiptap.dev)

Provides React components for Tiptap.

- Downloads / mo: 112.3M
- Stars: 39.1K
- Last release: 3.34.0
- License: MIT
- Capabilities: [From the @tiptap/react docs](https://tiptap.dev)

```sh
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit @tiptap/markdown
```

**Quickstart**

```tsx
import { EditorContent, useEditor } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import { Markdown } from '@tiptap/markdown'

export default function App() {
  const editor = useEditor({ extensions: [StarterKit, Markdown], content: '# Hello', contentType: 'markdown' })
  return <EditorContent editor={editor} />
}

```

From [README.md](https://tiptap.dev/docs/editor/getting-started/install/react) · [Find projects using @tiptap/react →](https://dashboard.exa.ai/playground/search?q=%40tiptap/react%20GitHub%20projects)

### @monaco-editor/react

[GitHub](https://github.com/suren-atoyan/monaco-react) · [npm](https://www.npmjs.com/package/@monaco-editor/react)

Uses the Monaco editor in any React application without webpack or other bundler configuration files.

- Downloads / mo: 38.6M
- Stars: 4.8K
- Last release: 4.7.0
- License: MIT
- Capabilities: [From the @monaco-editor/react docs](https://github.com/suren-atoyan/monaco-react)

```sh
npm install @monaco-editor/react
```

**Quickstart**

```tsx
import Editor from '@monaco-editor/react'

export default function App() {
  return <Editor height="300px" defaultLanguage="markdown" defaultValue="# Hello" />
}

```

From [README.md](https://github.com/suren-atoyan/monaco-react/blob/master/README.md) · [Find projects using @monaco-editor/react →](https://dashboard.exa.ai/playground/search?q=%40monaco-editor/react%20GitHub%20projects)

### @lexical/react

[GitHub](https://github.com/meta/lexical) · [npm](https://www.npmjs.com/package/@lexical/react)

Provides Lexical components and hooks for React applications.

- Downloads / mo: 30.7M
- Stars: 24.0K
- Last release: 0.53.0
- License: MIT
- Capabilities: [From the @lexical/react docs](https://www.npmjs.com/package/@lexical/react)

```sh
npm install react react-dom lexical@0.53.0 @lexical/react@0.53.0 @lexical/rich-text@0.53.0
```

**payloadcms/payload** (45.9K stars)

[payloadcms/payload](https://github.com/payloadcms/payload) 

```jsx
export const LexicalEditor: React.FC<
  {
    editorContainerRef: React.RefObject<HTMLDivElement | null>
    isSmallWidthViewport: boolean
  } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange' | 'rtl'>
> = (props) => {
  const { editorConfig, editorContainerRef, isSmallWidthViewport, onChange, rtl } = props
  const editorConfigContext = useEditorConfigContext()
  const [editor] = useLexicalComposerContext()
  const isEditable = useLexicalEditable()
  const { t } = useTranslation<Record<string, never>, string>()
  const instructionsID = React.useId()
  const hasTabIndentation = isEditable && editorConfig.features.enabledFeatures.includes('indent')

  const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)
  const onRef = (_floatingAnchorElem: HTMLDivElement) => {
    if (_floatingAnchorElem !== null) {
      setFloatingAnchorElem(_floatingAnchorElem)
    }
  }

  useEffect(() => {
    if (!editorConfigContext?.uuid) {
      console.error('Lexical Editor must be used within an EditorConfigProvider')
      return
    }
    if (editorConfigContext?.parentEditor?.uuid) {
      editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)
    }

    const handleFocus = () => {
      editorConfigContext.focusEditor(editorConfigContext)
    }

    const handleBlur = () => {
      editorConfigContext.blurEditor(editorConfigContext)
    }

    const unregisterFocus = editor.registerCommand(
      FOCUS_COMMAND,
      () => {
        handleFocus()
        return true
      },
      COMMAND_PRIORITY_LOW,
    )

    const unregisterBlur = editor.registerCommand(
      BLUR_COMMAND,
      () => {
        handleBlur()
        return true
      },
      COMMAND_PRIORITY_LOW,
    )

    return () => {
      unregisterFocus()
      unregisterBlur()
      editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)
    }
  }, [editor, editorConfigContext])

  return (
    <React.Fragment>
      {editorConfig.features.plugins?.map((plugin) => {
        if (plugin.position === 'aboveContainer') {
          return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />
        }
      })}
      <div className="editor-container" dir={rtl ? 'rtl' : undefined} ref={editorContainerRef}>
        {editorConfig.features.plugins?.map((plugin) => {
          if (plugin.position === 'top') {
            return (
              <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />
            )
          }
        })}
        <RichTextPlugin
          contentEditable={
            <div className="editor-scroller">
              <div className="editor" ref={onRef}>
                <LexicalContentEditable
                  editorConfig={editorConfig}
                  instructionsID={hasTabIndentation ? instructionsID : undefined}
                />
              </div>
            </div>
          }
          ErrorBoundary={LexicalErrorBoundary}
        />
        <NormalizeSelectionPlugin />
        {isEditable && <InsertParagraphAtEndPlugin />}
        <DecoratorPlugin />
        <ClipboardPlugin />
        <TextPlugin features={editorConfig.features} />
        <SelectAllPlugin />
        <NodeViewOverridePlugin />
        {isEditable && (
          <OnChangePlugin
            // Selection changes can be ignored here, reducing the
            // frequency that the FieldComponent and Payload receive updates.
            // Selection changes are only needed if you are saving selection state
            ignoreSelectionChange
            onChange={(editorState, editor, tags) => {
              // Ignore any onChange event triggered by focus only
              if (!tags.has('focus') || tags.size > 1) {
                if (onChange != null) {
                  onChange(editorState, editor, tags)
                }
              }
            }}
          />
        )}
        {floatingAnchorElem && (
          <React.Fragment>
            {!isSmallWidthViewport && isEditable && (
              <React.Fragment>
                {editorConfig.admin?.hideDraggableBlockElement ? null : (
                  <DraggableBlockPlugin anchorElem={floatingAnchorElem} />
                )}
                {editorConfig.admin?.hideAddBlockButton ? null : (
                  <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />
                )}
              </React.Fragment>
            )}
            {editorConfig.features.plugins?.map((plugin) => {
              if (
                plugin.position === 'floatingAnchorElem' &&
                !(plugin.desktopOnly === true && isSmallWidthViewport)
              ) {
                return (
                  <EditorPlugin
                    anchorElem={floatingAnchorElem}
                    clientProps={plugin.clientProps}
                    key={plugin.key}
                    plugin={plugin}
                  />
                )
              }
            })}
            {isEditable && (
              <React.Fragment>
                <SlashMenuPlugin anchorElem={floatingAnchorElem} />
              </React.Fragment>
            )}
          </React.Fragment>
        )}
        {isEditable && (
          <React.Fragment>
            <HistoryPlugin />
            {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}
          </React.Fragment>
        )}
        {editorConfig.features.plugins?.map((plugin) => {
          if (plugin.position === 'normal') {
            return (
              <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />
            )
          }
        })}
        {editorConfig.features.plugins?.map((plugin) => {
          if (plugin.position === 'bottom') {
            return (
              <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />
            )
          }
        })}
      </div>
      {hasTabIndentation && (
        <p className="ContentEditable__keyboard-hint" id={instructionsID}>
          {t('lexical:indent:keyboardHint')}
        </p>
      )}
      {editorConfig.features.plugins?.map((plugin) => {
        if (plugin.position === 'belowContainer') {
          return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />
        }
      })}
    </React.Fragment>
  )
}
```

[packages/richtext-lexical/src/lexical/LexicalEditor.tsx](https://github.com/payloadcms/payload/blob/d2b5206968c4f759d37bfb147081e30e55ef17f2/packages/richtext-lexical/src/lexical/LexicalEditor.tsx#L31-L212) · [More projects using @lexical/react →](https://dashboard.exa.ai/playground/search?q=%40lexical/react%20GitHub%20projects)

**Quickstart**

```jsx
import { LexicalExtensionComposer } from '@lexical/react/LexicalExtensionComposer';
import { RichTextExtension } from '@lexical/rich-text';
import { defineExtension } from 'lexical';
const extension = defineExtension({ name: 'example', namespace: 'example', dependencies: [RichTextExtension] });
export default function App() {
  return <LexicalExtensionComposer extension={extension} />;
}

```

From [LexicalExtensionComposer.d.ts](https://cdn.jsdelivr.net/npm/@lexical/react@0.53.0/dist/LexicalExtensionComposer.d.ts)

### @uiw/react-codemirror

[GitHub](https://github.com/uiwjs/react-codemirror) · [npm](https://www.npmjs.com/package/@uiw/react-codemirror)

Provides a CodeMirror component for React.

- Downloads / mo: 27.3M
- Stars: 2.3K
- Last release: 4.25.12
- License: MIT
- Capabilities: [From the @uiw/react-codemirror docs](https://github.com/uiwjs/react-codemirror)

```sh
npm install @uiw/react-codemirror @codemirror/lang-markdown
```

**sleuth-io/sx** (319 stars)

[sleuth-io/sx](https://github.com/sleuth-io/sx) 

```tsx
export default function MarkdownEditor({
  value,
  onChange,
  readOnly = false,
  onView,
}: {
  value: string;
  onChange: (value: string) => void;
  readOnly?: boolean;
  /** Receives the live CodeMirror view (for the extension editor API). */
  onView?: (view: EditorView) => void;
}) {
  const dark = usePrefersDark();
  return (
    <CodeMirror
      value={value}
      onChange={onChange}
      readOnly={readOnly}
      onCreateEditor={(view) => onView?.(view)}
      theme={dark ? "dark" : "light"}
      extensions={[
        // codeLanguages lights up fenced code blocks (```go, ```ts, …)
        // with each language's own grammar while editing.
        markdown({ codeLanguages: languages }),
        baseTheme,
        EditorView.lineWrapping,
      ]}
      basicSetup={{
        lineNumbers: true,
        foldGutter: false,
        highlightActiveLine: !readOnly,
        highlightActiveLineGutter: !readOnly,
      }}
      height="100%"
      className="h-full overflow-hidden rounded-lg border border-line"
    />
  );
}

```

[app/frontend/src/components/MarkdownEditor.tsx](https://github.com/sleuth-io/sx/blob/153b266ca1100e04d21346b7af558a99bd53e476/app/frontend/src/components/MarkdownEditor.tsx#L39-L76) · [More projects using @uiw/react-codemirror →](https://dashboard.exa.ai/playground/search?q=%40uiw/react-codemirror%20GitHub%20projects)

**Quickstart**

```tsx
import CodeMirror from '@uiw/react-codemirror'
import { markdown } from '@codemirror/lang-markdown'

export default function App() {
  return <CodeMirror value="# Hello" extensions={[markdown()]} />
}

```

From [README.md](https://github.com/uiwjs/react-codemirror/blob/master/README.md)

### @mdxeditor/editor

[GitHub](https://github.com/mdx-editor/editor) · [npm](https://www.npmjs.com/package/@mdxeditor/editor) · [Docs](https://mdxeditor.dev/)

Provides formatted Markdown editing with optional JSX component editors.

- Downloads / mo: 7.7M
- Stars: 3.7K
- Last release: 4.5.0
- License: MIT
- Capabilities: [From the @mdxeditor/editor docs](https://mdxeditor.dev/)

**Strengths**

- **Edits Markdown as formatted content.** Authors edit documents naturally, with headings, tables, and images.
- **Edits embedded JSX components.** Use the built-in JSX editor or supply a custom one.

**Watch out for**

- **Requires client rendering.** Render the editor and initialize its plugins only on the client.
- **External updates need a ref.** Call setMarkdown to change content after the initial value.

```sh
npm install react react-dom @mdxeditor/editor
```

**browseros-ai/BrowserOS** (14.4K stars)

[browseros-ai/BrowserOS](https://github.com/browseros-ai/BrowserOS) 

```tsx
export const MarkdownEditor = ({
  value,
  onChange,
  placeholder,
  className,
  autoFocus,
  readOnly,
  onKeyDown,
  id,
}: MarkdownEditorProps) => {
  const editorRef = useRef<MDXEditorMethods>(null)
  const plugins = usePlugins(readOnly)

  const lastSetMarkdown = useRef(value)

  useEffect(() => {
    if (lastSetMarkdown.current === value) return
    const current = editorRef.current?.getMarkdown() ?? ''
    if (current !== value) {
      lastSetMarkdown.current = value
      editorRef.current?.setMarkdown(value)
    }
  }, [value])

  const handlePaste = (e: React.ClipboardEvent<HTMLDivElement>) => {
    const text = e.clipboardData.getData('text/plain')
    if (!text) return

    const markdownPattern =
      /^#{1,6}\s|^\s*[-*+]\s|^\s*\d+\.\s|\*\*.+\*\*|__.+__|\[.+\]\(.+\)|^>/m
    if (!markdownPattern.test(text)) return

    e.preventDefault()
    e.stopPropagation()
    editorRef.current?.insertMarkdown(text)
  }

  return (
    <div id={id} className={cn('mdx-editor-outer', className)}>
      {/* biome-ignore lint/a11y/noStaticElementInteractions: onKeyDown/onPasteCapture forwarding */}
      <div
        className="mdx-editor-themed"
        onKeyDown={onKeyDown}
        onPasteCapture={handlePaste}
      >
        <MDXEditor
          ref={editorRef}
          markdown={value}
          onChange={onChange}
          placeholder={placeholder}
          plugins={plugins}
          autoFocus={autoFocus}
          readOnly={readOnly}
          contentEditableClassName="mdx-content-editable prose prose-sm max-w-none dark:prose-invert"
        />
      </div>
      <div className="mdx-copy-bar">
        <CopyMarkdownButton editorRef={editorRef} />
      </div>
    </div>
  )
}

```

[packages/browseros-agent/apps/app/components/ui/MarkdownEditor.tsx](https://github.com/browseros-ai/BrowserOS/blob/8144160a4e9c4da34eb8def0a2bc767f786e80b6/packages/browseros-agent/apps/app/components/ui/MarkdownEditor.tsx#L100-L161) · [More projects using @mdxeditor/editor →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20%40mdxeditor/editor%20for%20React%20Markdown%20editing%20with%20lifecycle%2C%20preview%20and%20content%20saving&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { MDXEditor } from '@mdxeditor/editor';
import '@mdxeditor/editor/style.css';
export default function App() {
  return <MDXEditor markdown='Hello world' />;
}

```

From [README.md](https://mdxeditor.dev/editor/docs/getting-started)

### @uiw/react-md-editor

[GitHub](https://github.com/uiwjs/react-md-editor) · [npm](https://www.npmjs.com/package/@uiw/react-md-editor)

Provides a React Markdown text editor with syntax highlighting and preview.

- Downloads / mo: 4.2M
- Stars: 2.9K
- Last release: 4.2.4
- License: MIT
- Capabilities: [From the @uiw/react-md-editor docs](https://github.com/uiwjs/react-md-editor)

**Strengths**

- **Edits source beside its preview.** Use the editor and Markdown preview with shared React state.
- **Supports custom toolbar commands.** Supply commands to customize the editing toolbar.

**Watch out for**

- **Untrusted content needs sanitizing.** Add rehype-sanitize when Markdown authors cannot be trusted.
- **Next.js needs client rendering.** Load the editor dynamically with server rendering disabled.

```sh
npm i @uiw/react-md-editor
```

**Quickstart**

```tsx
import React from 'react'
import MDEditor from '@uiw/react-md-editor'

export default function App() {
  const [value, setValue] = React.useState('# Hello')
  return <MDEditor value={value} onChange={setValue} />
}

```

From [README.md](https://github.com/uiwjs/react-md-editor/blob/master/core/README.md) · [Find projects using @uiw/react-md-editor →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20%40uiw/react-md-editor%20for%20React%20Markdown%20editing%20with%20lifecycle%2C%20preview%20and%20content%20saving&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### @blocknote/react

[GitHub](https://github.com/TypeCellOS/BlockNote) · [npm](https://www.npmjs.com/package/@blocknote/react)

Provides a Notion-style, block-based, extensible text editor built on ProseMirror and Tiptap.

- Downloads / mo: 3.8M
- Stars: 10.4K
- Last release: 0.57.0
- License: MPL-2.0
- Capabilities: [From the @blocknote/react docs](https://github.com/TypeCellOS/BlockNote)

```sh
npm install react react-dom @blocknote/core @blocknote/react @blocknote/mantine @mantine/core @mantine/hooks @mantine/utils
```

**langchain-ai/open-canvas** (5.5K stars)

[langchain-ai/open-canvas](https://github.com/langchain-ai/open-canvas) 

```jsx
() => {
    const selectedText = editor.getSelectedText();
    const selection = editor.getSelection();

    if (selectedText && selection) {
      if (!artifact) {
        console.error("Artifact not found");
        return;
      }

      const currentBlockIdx = artifact.currentIndex;
      const currentContent = artifact.contents.find(
        (c) => c.index === currentBlockIdx
      );
      if (!currentContent) {
        console.error("Current content not found");
        return;
      }
      if (!isArtifactMarkdownContent(currentContent)) {
        console.error("Current content is not markdown");
        return;
      }

      (async () => {
        const [markdownBlock, fullMarkdown] = await Promise.all([
          editor.blocksToMarkdownLossy(selection.blocks),
          editor.blocksToMarkdownLossy(editor.document),
        ]);
        setSelectedBlocks({
          fullMarkdown: cleanText(fullMarkdown),
          markdownBlock: cleanText(markdownBlock),
          selectedText: cleanText(selectedText),
        });
      })();
    }
  }

```

[apps/web/src/components/artifacts/TextRenderer.tsx](https://github.com/langchain-ai/open-canvas/blob/0310cecd51f31b3d37a52d6d1060137da3405280/apps/web/src/components/artifacts/TextRenderer.tsx#L80-L115) · [More projects using @blocknote/react →](https://dashboard.exa.ai/playground/search?q=%40blocknote/react%20GitHub%20projects)

**Quickstart**

```jsx
import { useCreateBlockNote } from '@blocknote/react';
import { BlockNoteView } from '@blocknote/mantine';
import '@blocknote/core/fonts/inter.css';
import '@blocknote/mantine/style.css';
export default function App() {
  const editor = useCreateBlockNote();
  return <BlockNoteView editor={editor} />;
}

```

From [README.md](https://www.blocknotejs.org/docs/getting-started)

### @tinymce/tinymce-react

[GitHub](https://github.com/tinymce/tinymce-react) · [npm](https://www.npmjs.com/package/@tinymce/tinymce-react)

Provides the official React component for the TinyMCE rich text editor.

- Downloads / mo: 3.3M
- Stars: 1.1K
- Last release: 6.3.1
- License: MIT
- Capabilities: [From the @tinymce/tinymce-react docs](https://www.npmjs.com/package/@tinymce/tinymce-react)

```sh
npm install @tinymce/tinymce-react
```

**Quickstart**

```tsx
import { Editor } from '@tinymce/tinymce-react'

export default function App() {
  return <Editor apiKey="your-api-key" init={{ plugins: 'markdown' }} initialValue="<p>Hello</p>" />
}

```

From [README.md](https://www.tiny.cloud/docs/tinymce/latest/react-ref/) · [Find projects using @tinymce/tinymce-react →](https://dashboard.exa.ai/playground/search?q=%40tinymce/tinymce-react%20GitHub%20projects)

## FAQ

### Which React Markdown editor library should I use?

[@mdxeditor/editor](#mdxeditor) suits formatted Markdown editing with embedded JSX components. [@uiw/react-md-editor](#uiw-markdown-editor) suits source editing beside a live preview. [@tiptap/react](#tiptap-react) suits rich text editors built from Tiptap components.

### What is BlockNote?

[@blocknote/react](#blocknote-react) is a Notion-style, block-based, extensible text editor built on ProseMirror and Tiptap.

### What is MDXEditor?

[@mdxeditor/editor](#mdxeditor) provides formatted Markdown editing with optional JSX component editors. It renders only on the client.

### Is @uiw/react-md-editor safe for untrusted Markdown?

Only with rehype-sanitize added. Untrusted Markdown needs sanitizing before [@uiw/react-md-editor](#uiw-markdown-editor) renders it.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React Markdown editor libraries UIW MDXEditor Milkdown react-markdown-editor-lite code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
