Bold
CtrlBMake text stand out.
**bold text**
bold text
v1.0.0 · MIT licensed · 0 runtime dependencies
Split-view live preview, GitHub-style alerts, tabbed code groups, smart tables and a security-hardened renderer in one tiny, SSR-safe, TypeScript-first package.
npm install react-markdown-studio> [!NOTE] > Everything you type renders live. ## Why teams pick it - [x] Zero runtime dependencies - [x] Accessible, keyboard-first toolbar - [x] Safe to render untrusted Markdown - [ ] Your next feature here Use **bold**, *italic* and `code` freely.
Everything you type renders live.
Use bold, italic and code freely.
Playground
This is the actual component from the package, not a recording. Type, use the toolbar and shortcuts, tick a task in the preview, switch modes, export a file.
This is the real component, not a screenshot. Edit anything on the left; the preview updates on the right.
Try Ctrl+B, press Tab inside a list, or paste a URL over some selected text.
Write italic, bold, strikethrough, underline, inline code, H2O and E = mc2. Bare links such as https://github.com/AKASHNEGI-github/react-markdown-studio become clickable automatically.
Tab and Shift+Tab indent and outdent| Feature | Status | Notes |
|---|---|---|
| Alignment | Yes | left, centre, right |
| Tools | Yes | click inside a table |
npm install react-markdown-studiopnpm add react-markdown-studioyarn add react-markdown-studioimport { MarkdownEditor } from "react-markdown-studio";
import "react-markdown-studio/styles.css";
export default function App() {
return <MarkdownEditor defaultValue="# Hello" />;
}Raw HTML is never executed. Only a few safe tags (<u>, <sub>, <sup>, <details>) are understood.
Link schemes are checked against an allow-list, raw HTML is shown as text, and parsing is linear-time and depth-limited, so hostile input cannot hang or crash the page.
Made by Akash Negi. MIT licensed.
Tip: Ctrl+B bolds, Tab nests list items, and pasting a URL over selected text makes a link. Everything runs in your browser; nothing is uploaded.
Features
A complete writing experience without a pile of plugins. All of it ships in one package with no runtime dependencies.
Write on the left, see the result on the right. Edit, split, preview and HTML-source modes, with synchronised scrolling and a responsive mobile layout.
Bold, italic, headings, lists, links, images, quotes, tables and more, all from the toolbar or the keyboard. Every button is also a plain, tested function you can reuse.
NOTE, TIP, IMPORTANT, WARNING and CAUTION callouts with the same syntax GitHub uses, so your documents render identically in both places.
Dropdown details blocks that can contain any Markdown, including lists, tables and code. Add open to start expanded.
Show the same snippet for npm, pnpm and yarn as tabs with one block of Markdown. Every code block gets a title bar and a copy button.
Column alignment, and a context toolbar that appears when your cursor is inside a table: insert and delete rows and columns, change alignment.
Readers can tick checkboxes in the preview and your Markdown source updates automatically. Perfect for notes, plans and issue templates.
Nineteen languages highlighted by a small built-in engine, so there is no highlight.js or Prism to install, and you can plug in your own highlighter.
Print to PDF, download the Markdown, or download a complete standalone HTML page with an embedded stylesheet and working tabs.
Scheme-allow-listed links, no raw HTML execution, linear-time parsing and depth limits: hostile input cannot hang or crash it. Strict-CSP mode included.
The parser and HTML renderer run on the server with no DOM. Render Markdown in Next.js, Remix or plain Node, and hydrate the editor on the client.
Light, dark and auto modes out of the box, and every colour is a CSS variable, so matching your brand takes a few lines of CSS.
Familiar shortcuts, Tab to indent lists, Enter to continue them, and an ARIA toolbar that is a single tab stop with arrow-key navigation.
Provide an upload function and pasted or dropped images become hosted links with a live placeholder. Without one, nothing is ever embedded or sent.
Paste a URL over selected text to turn it into a link instantly, and press Enter inside a list or quote to continue it.
The preview renders off the typing path with deferred updates, and the parser is linear-time, so long documents stay responsive.
Nothing to audit, nothing to keep patched, nothing that can break your install. React is the only peer dependency.
Markdown commands
Type the syntax, or use the toolbar button and shortcut. Each example below is rendered live by the same parser the editor uses, so what you see is exactly what you get.
26 features
Make text stand out.
**bold text**
bold text
Emphasise text. _underscores_ work too.
*italic text*
italic text
Combine both; toggling one never drops the other.
***bold and italic***
bold and italic
Cross out text.
~~no longer true~~
no longer true
Underline text using the one HTML tag that renders.
<u>underlined</u>
underlined
Lower the baseline, as in chemical formulas.
H<sub>2</sub>O
H2O
Raise the baseline, as in exponents.
E = mc<sup>2</sup>
E = mc2
Monospace for identifiers and short snippets.
Run `npm install` first.
Run npm install first.
A backslash shows a special character literally.
\*not italic\*
*not italic*
End a line with two spaces or a backslash to break without starting a new paragraph.
first line\ second line
first line
second line
One to six # characters set the level. Each heading gets a linkable anchor.
# Heading 1 ## Heading 2 ### Heading 3
Underline a line with = or - for a level 1 or 2 heading.
Title ===== Subtitle --------
A thematic break between sections.
---
Quote a passage. Press Enter to continue the quote.
> Simplicity is the ultimate sophistication. > Leonardo da Vinci
Simplicity is the ultimate sophistication. Leonardo da Vinci
Pipes separate columns; colons in the divider row set alignment. Click inside a table for row and column tools.
| Left | Center | Right | | :--- | :----: | ----: | | a | b | c | | d | e | f |
| Left | Center | Right |
|---|---|---|
| a | b | c |
| d | e | f |
Use -, * or +. Tab and Shift+Tab nest and un-nest items; Enter continues the list.
- First - Second - Nested
Numbers continue automatically, and Tab nests under the correct indentation.
1. First 2. Second 1. Nested
Checkboxes you can click in the preview, which updates your Markdown.
- [x] Write the docs - [ ] Ship the release
Fence code with three backticks and a language for syntax highlighting. Every block has a copy button.
```ts const answer: number = 42; ```
const answer: number = 42;Add a title in square brackets after the language.
```ts [greet.ts]
export const greet = (name: string) => `Hello, ${name}!`;
```export const greet = (name: string) => `Hello, ${name}!`;Show the same snippet for several tools as tabs. Each fence's title becomes its tab.
::: code-group ```bash [npm] npm install react-markdown-studio ``` ```bash [pnpm] pnpm add react-markdown-studio ``` ```bash [yarn] yarn add react-markdown-studio ``` :::
npm install react-markdown-studiopnpm add react-markdown-studioyarn add react-markdown-studioWrap the text in brackets and the URL in parentheses. Paste a URL over selected text to link it instantly.
[React Markdown Studio](https://github.com/AKASHNEGI-github/react-markdown-studio "Project home")
Bare web addresses become links, with trailing punctuation handled sensibly.
Visit https://example.com or www.example.org.
Visit https://example.com or www.example.org.
Like a link with a leading !. Pass onImageUpload to paste or drop images straight into the editor.

GitHub-style callouts: NOTE, TIP, IMPORTANT, WARNING and CAUTION.
> [!NOTE] > Useful background information. > [!WARNING] > Urgent: avoid doing this.
Useful background information.
Urgent: avoid doing this.
A dropdown that hides detail until it is opened. Add open to start expanded.
<details> <summary>Click to expand</summary> Hidden until you ask for it. </details>
Hidden until you ask for it.
On macOS, use ⌘ in place of Ctrl.
| Action | Shortcut |
|---|---|
| Bold | CtrlB |
| Italic | CtrlI |
| Underline | CtrlU |
| Strikethrough | CtrlShiftX |
| Inline code | CtrlE |
| Insert link | CtrlK |
| Undo | CtrlZ |
| Redo | CtrlShiftZ or CtrlY |
| Heading 1 | Ctrl1 |
| Heading 2 | Ctrl2 |
| Heading 3 | Ctrl3 |
| Numbered list | CtrlShift7 |
| Bulleted list | CtrlShift8 |
| Task list | CtrlShift9 |
| Blockquote | CtrlShift. |
| Indent / nest list item | Tab |
| Outdent list item | ShiftTab |
| Continue list or quote | Enter |
Get started
React 18 and 19 are supported. Import the stylesheet once and you are done.
npm install react-markdown-studioimport { useState } from "react";
import { MarkdownEditor } from "react-markdown-studio";
import "react-markdown-studio/styles.css";
export default function Notes() {
const [markdown, setMarkdown] = useState("# Hello");
return <MarkdownEditor value={markdown} onChange={setMarkdown} height="480px" />;
}// Interactive, read-only rendering in a React tree
import { MarkdownViewer } from "react-markdown-studio";
<MarkdownViewer value={post.body} />;
// On the server: Next.js route, Node script, edge function. No DOM needed.
import { markdownToHtml } from "react-markdown-studio/core";
const html = markdownToHtml(userInput);<MarkdownEditor
// Pasted or dropped images are uploaded by *your* function; without it, nothing is embedded or sent.
onImageUpload={async (file) => (await uploadToMyCdn(file)).url}
// Stops author-controlled heading ids from shadowing window globals.
headingIdPrefix="user-content-"
/>;
// Strict Content-Security-Policy (no inline scripts)?
import { markdownToHtml, enhanceHtml } from "react-markdown-studio";
const html = markdownToHtml(src, undefined, { scripts: false });
enhanceHtml(document.body); // adds tab + copy behaviour from your own bundleFull prop and method reference in the API docs. Upgrading from akash-negi-markdown-editor? See the migration guide.
Theming
Light, dark and auto are built in. Everything else is a variable on the editor's root, with no build step and no theme object.
Every colour is a CSS variable, so a theme is a handful of lines.
Alerts, code, tables and links all follow the variables below.
| Token | Role |
|---|---|
--rmds-accent | Links and focus |
--rmds-bg | Surface |
const theme = "yours";/* Defaults follow light/dark automatically. Override any --rmds-* variable to customise. */
Compare
Different tools suit different jobs. These are measured facts from the npm registry, not a verdict. WYSIWYG editors trade size and dependencies for rich-text editing; this is a source-plus-preview editor, like GitHub's, where you always see and control the Markdown.
| Package | Editing style | Runtime dependencies | Unpacked size | Last updated |
|---|---|---|---|---|
| react-markdown-studio | Source + preview | 0 | 616 KB | Nov 2026 |
| @uiw/react-md-editor | Source + preview | 4 | 4.2 MB | Nov 2026 |
| @mdxeditor/editor | WYSIWYG | 57 | 644 KB | Nov 2026 |
| @milkdown/crepe | WYSIWYG | 17 | 3.3 MB | Oct 2026 |
| react-markdown-editor-lite | Source + preview | 3 | 483 KB | Jan 2026 |
| react-mde | Source + preview | 0 | 602 KB | Jun 2022 |
| react-simplemde-editor | Source + preview | 1 | 565 KB | Oct 2022 |
Snapshot of the public npm registry, 4 November 2026. Sizes are the published tarball unpacked and exclude dependencies; this package ships ESM, CommonJS and type definitions.
FAQ
Short, honest answers to what people ask before adopting a Markdown editor.
React Markdown Studio is a zero-dependency Markdown editor and renderer for React. It gives you a toolbar, keyboard shortcuts, undo and redo, a live split-view preview, GitHub-style alerts, tabbed code groups, tables, task lists and syntax highlighting in a single npm package.
react-markdown is a renderer: it turns a Markdown string into React elements. React Markdown Studio includes a complete editor interface (toolbar, shortcuts, history, split preview, export) as well as a renderer (the MarkdownViewer component and the markdownToHtml function), with no runtime dependencies. Choose a renderer-only library if you just need to display Markdown and want its plugin ecosystem.
Yes. The parser and HTML renderer in react-markdown-studio/core need no DOM and run in Node, route handlers, Server Components and edge functions. The editor and viewer are client components marked with the use client directive, and they render safely on the server before hydrating.
It is designed for untrusted input: link schemes are limited to http, https and mailto, raw HTML is never executed (only u, sub, sup and details tags are recognised), parsing runs in linear time with depth limits so hostile input cannot hang or crash it, and a strict Content-Security-Policy mode is available. No software can promise absolute security, so please read the security policy and report any issue privately.
React 18 and React 19. The full test suite, including component and server-rendering tests, runs against both in continuous integration.
Yes. React Markdown Studio is released under the MIT license, which allows personal and commercial use.
Pass an onImageUpload function to the editor. When a user pastes or drops an image, the editor shows an uploading placeholder, calls your function with the file, and replaces the placeholder with the Markdown image link you return. Without that prop, images are never embedded or sent anywhere.
Yes. There are built-in light, dark and auto themes, and every colour is a CSS custom property starting with --rmds-, so matching your brand takes a few lines of CSS with no build step.
A small built-in engine highlights JavaScript, TypeScript and TSX, Python, Bash, JSON, YAML, HTML, CSS, SQL, Go, Rust, Java, C, C++, C#, PHP, Diff and Markdown, plus plain text. You can also plug in your own highlighter.
No. It is a source-plus-preview editor, like GitHub's: you write real Markdown on one side and see the rendered result on the other, so you always control exactly what is saved.
Links
Everything you need to adopt it, extend it or help improve it.
Browse, star and fork the repository on GitHub.
Versions, tarball contents and install stats.
Every prop, ref method and render option.
Everything the parser understands, in one page.
Found a problem? Open an issue with a reproduction.
Questions, ideas and show-and-tell.
What changed in each release.
How to report a vulnerability privately.
Set up the repo and send your first pull request.
Free for personal and commercial use.