Modern WYSIWYG editor for content creators. Notion-like experience.
Clean HTML output. Zero dependencies. Vanilla JS.
Compatible with everything that can work with a plain <textarea>.
A lightweight, powerful editor that produces clean semantic HTML without any framework dependencies.
Bold, italic, underline, strikethrough, inline code, spoilers, and text highlighting with a floating toolbar.
Type # for headings, - for lists, > for quotes. Familiar and fast.
Drag-and-drop blocks, transform types, duplicate, delete. Full control with the handle menu.
Insert and edit tables with context menus for rows, columns, and header management.
Drag & drop, paste, or upload images. Full control over alt, title, srcset, and captions. YouTube embeds with responsive wrapper.
Syntax-highlighted code blocks with language selection. Click to edit in a dedicated modal.
Styled callout boxes (info, warning, danger, success) and quote presets for visual variety.
Search through content with highlighting, navigate matches, and replace text globally.
Semantic HTML without inline styles or unnecessary attributes. Perfect for CMS integration.
Paste from Google Docs, Word, or any source. Formatting is preserved, junk is removed.
Full history stack with Ctrl+Z and Ctrl+Y support. Never lose your changes.
Distraction-free writing with fullscreen toggle. Focus on your content.
Speed up your workflow with Markdown-style shortcuts.
| Shortcut | Action | Description |
|---|---|---|
# |
Heading 1 | Type at the start of a line and press space |
## |
Heading 2 | Type at the start of a line and press space |
### |
Heading 3 | Type at the start of a line and press space |
- or * |
Bullet List | Creates an unordered list item |
1. |
Numbered List | Creates an ordered list item |
> |
Blockquote | Creates a quote block |
! |
Callout | Creates a callout/aside block |
--- |
Separator | Inserts a horizontal rule |
Ctrl+Z |
Undo | Revert last change |
Ctrl+Y |
Redo | Restore undone change |
Ctrl+F |
Find | Open find & replace panel |
Play with the editor below. All features are enabled.
Set up Redactix in your project in minutes.
Add the CSS and JS files to your project.
<!-- CSS -->
<link rel="stylesheet" href="/redactix/Redactix.css">
<!-- JS (ES Module) -->
<script type="module">
import Redactix from './redactix/Redactix.js';
</script>
Create a textarea element with initial content (optional).
<textarea class="redactix">
<p>Your initial content here...</p>
</textarea>
Create a new Redactix instance with optional configuration.
new Redactix({
selector: '.redactix',
// Custom callout presets (optional)
calloutPresets: [
{ name: 'custom', label: 'My Style', class: 'my-callout' }
],
// Custom quote presets (optional)
quotePresets: [
{ name: 'fancy', label: 'Fancy Quote', class: 'fancy-quote' }
]
});
selectorCSS selector for textarea elements to transform into editors. Default: .redactix
calloutPresetsArray of custom callout styles. Each preset needs name, label, and class properties.
quotePresetsArray of custom blockquote styles. Same structure as callout presets.
uploadUrlURL endpoint for image uploads. Enables drag & drop, paste, and file picker. Default: null
Built-in support for drag & drop, paste, and file picker with a secure PHP backend.
Simply drag images from your desktop or file manager directly into the editor. Visual feedback shows where images will be inserted.
Copy an image and press Ctrl+V to insert it. Works with screenshots, copied images from browsers, and image editors.
Click the Image button in the toolbar to open a modal with file upload zone. Drag & drop works there too.
Pass the uploadUrl option when initializing Redactix. This enables all upload features.
new Redactix({
selector: '.redactix',
uploadUrl: '/upload.php' // Your upload endpoint
});
Redactix comes with a secure upload.php script. Configure the settings at the top of the file.
// upload.php configuration
$uploadDir = __DIR__ . '/uploads/'; // Where to store files
$uploadUrlPrefix = '/uploads/'; // URL prefix for images
$maxFileSize = 5 * 1024 * 1024; // 5MB limit
$csrfToken = null; // Optional CSRF token
Make sure the uploads directory exists and is writable. The script will create .htaccess automatically for security.
mkdir uploads
chmod 755 uploads
Files are validated by actual content type using finfo, not just extension. Supports JPEG, PNG, GIF, WebP, AVIF, HEIC, and SVG.
Raster images are verified with getimagesize(). SVG validated as XML. HEIC passed through as-is.
Original filenames are discarded. Files are saved with random 32-character hex names to prevent conflicts.
All errors (disk full, invalid file, permissions) are returned as JSON and displayed to the user in the editor.
The included upload.php is a basic example. For production use, add your own security measures: authentication, CSRF tokens, rate limiting, and file storage outside web root.
Your upload endpoint should return JSON with these fields:
{
"success": true,
"src": "/uploads/abc123.jpg", // Required
"srcset": "", // Optional
"alt": "", // Optional
"title": "", // Optional
"caption": "" // Optional
}
All fields except src are empty by default. Customize the PHP script to auto-generate alt text, srcset, or captions if needed.
The WYSIWYG landscape is broken. Here's what's wrong with it.
CKEditor, Imperavi... Great features, but licensing costs can reach thousands per year. Not everyone has that budget.
jQuery-based editors with outdated UX. Clunky toolbars, messy HTML output full of inline styles and deprecated tags.
Modern alternatives require React, Vue, or 100+ npm dependencies. Good luck integrating that into a simple PHP project.
I wanted something functional on the level of Notion, but under the hood — just a simple <textarea>. 100% compatibility with any CMS. No third-party components. No complex state management. Just paste the files, initialize, and it works.
Markdown is great for developers, but try configuring srcset, loading="lazy", or custom attributes for an image. How do you add rel="nofollow" to a link? What about tables with colspan?
Clean semantic HTML gives you full control over formatting. And if you really need Markdown — there are plenty of html-to-md converters out there.
No style="font-family: Arial; font-size: 14px; color: rgb(0,0,0);" garbage. No <span> wrappers for every word. No Microsoft Office artifacts. Just pure, semantic HTML that your CMS will love.