Redactix

Modern WYSIWYG editor for content creators. Notion-like experience.
Slash commands, floating toolbar, clean HTML output. Zero dependencies.
Compatible with everything that can work with a plain <textarea>.

Why Redactix?

A lightweight, powerful editor that produces clean semantic HTML without any framework dependencies.

Rich Text Formatting

Bold, italic, underline, strikethrough, inline code, spoilers, and text highlighting with a floating toolbar.

📝

Slash Commands

Type / to open command menu. Insert headings, lists, images, tables, and more. Just like Notion.

📃

Block Controls

Drag-and-drop blocks, transform types, duplicate, delete. Full control with the handle menu.

📊

Tables

Insert and edit tables with context menus for rows, columns, and header management.

🎨

Images & Media

Drag & drop, paste, or upload images. Full control over alt, title, srcset, and captions. YouTube embeds with responsive wrapper.

💻

Code Blocks

Syntax-highlighted code blocks with language selection. Click to edit in a dedicated modal.

💡

Callouts & Quotes

Styled callout boxes (info, warning, danger, success) and quote presets for visual variety.

🔍

Find & Replace

Search through content with highlighting, navigate matches, and replace text globally.

📄

Clean HTML Output

Semantic HTML without inline styles or unnecessary attributes. Perfect for CMS integration.

Smart Paste

Paste from Google Docs, Word, or any source. Formatting is preserved, junk is removed.

🔄

Undo/Redo History

Full history stack with Ctrl+Z and Ctrl+Y support. Never lose your changes.

Fullscreen Mode

Distraction-free writing with fullscreen toggle. Focus on your content.

Keyboard Shortcuts

Speed up your workflow with slash commands and Markdown-style shortcuts.

Shortcut Action Description
/ Slash Commands Opens command menu with all block types (h1, h2, h3, quote, callout, code, image, youtube, table, hr, ol, ul)
# 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

Try It Out

Play with the editor below. All features are enabled.

Lite Mode

Simplified editor for comments and forum posts. No toolbar, no image uploads, no advanced settings, all links are nofollow. Use / command or Markdown shortcuts for formatting.

Localization

Redactix supports multiple languages out of the box. Click on a language card to see the editor in action.

🇺🇸
English
'en'
🇷🇺
Русский
'ru'
🇺🇦
Українська
'uk'
🇵🇱
Polski
'pl'
🇩🇪
Deutsch
'de'
🇫🇷
Français
'fr'
🇪🇸
Español
'es'
🇧🇷
Português
'pt'
🇷🇸
Srpski
'sr'
🇬🇪
ქართული
'ka'
🇻🇳
Tiếng Việt
'vi'
🇹🇭
ไทย
'th'
🇰🇪
Kiswahili
'sw'
🇹🇷
Türkçe
'tr'
🇸🇦
العربية
'ar'
🇮🇱
עברית
'he'
🇯🇵
日本語
'ja'
🇰🇷
한국어
'ko'
🇨🇳
中文
'zh'
🇰🇿
Қазақша
'kk'
🇺🇿
O'zbek
'uz'
locale: 'en'

Dark Theme

Built-in dark theme with full CSS variable support. All UI elements are themed including modal dialogs, menus, and buttons. Use theme: 'dark' or theme: 'auto' (follows system preference).

Getting Started

Set up Redactix in your project in minutes.

1

Include the Files

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>
2

Add a Textarea

Create a textarea element with initial content (optional).

<textarea class="redactix"> <p>Your initial content here...</p> </textarea>
3

Initialize the Editor

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' } ] });

Configuration Options

selector

CSS selector for textarea elements to transform into editors. Default: .redactix

uploadUrl

URL endpoint for image uploads. Enables drag & drop, paste, and file picker. Default: null

browseUrl

URL endpoint for browsing uploaded images. Shows "Choose from uploaded" button. Default: null

allowImageDelete

Show delete buttons in image gallery. Requires server-side support. Default: false

maxHeight

Maximum height of the editor area. Any CSS value: '500px', '50vh'. Default: null (no limit)

classes

Array of CSS classes for quick select in Attributes dialog. If empty/null, the section is hidden.

calloutPresets

Array of custom callout styles. Each preset needs name, label, and class properties.

quotePresets

Array of custom blockquote styles. Same structure as callout presets.

theme

Color theme: 'light' (default), 'dark', or 'auto' (follows system preference).

locale

Interface language: 'en', 'ru', 'uk', 'pl', 'de', 'fr', 'es', 'pt', 'sr', 'ka', 'vi', 'th', 'sw', 'tr', 'ar', 'he', 'ja', 'ko', 'zh', 'kk', 'uz'. RTL languages (ar, he) auto-detect.

JavaScript API

Access editor instances via textarea.redactix for programmatic control.

// Get textarea element const textarea = document.querySelector('#my-editor'); // Get clean HTML content const html = textarea.redactix.getContent(); // Set new content (resets history) textarea.redactix.setContent('<h1>New content</h1>'); // Copy content between editors target.redactix.setContent(source.redactix.getContent());

getContent()

Returns clean HTML without editor-specific wrappers (separators, contenteditable attrs).

setContent(html)

Sets new HTML content, re-initializes editor elements (figures, code blocks), resets undo history.

sync()

Manually syncs editor content to the original textarea. Called automatically on changes.

Theming with CSS Variables

All colors use CSS custom properties — editor, toolbar, modals, menus, buttons. Override them without !important.

/* Light theme customization */ .redactix-wrapper { --redactix-primary: #8b5cf6; /* Purple accent */ --redactix-primary-hover: #7c3aed; } /* Dark theme customization - match selector specificity */ .redactix-wrapper.redactix-dark { --redactix-primary: #a855f7; /* Brighter for dark */ --redactix-primary-hover: #c084fc; }

Note: When customizing dark theme, use .redactix-wrapper.redactix-dark selector for proper specificity.

Primary Colors

--redactix-primary, --redactix-primary-hover, --redactix-primary-light — accent color for buttons, links, focus states.

Base Colors

--redactix-bg, --redactix-bg-secondary, --redactix-bg-hover, --redactix-border — backgrounds and borders.

Text Colors

--redactix-text, --redactix-text-muted, --redactix-text-placeholder — main text, secondary text, placeholders.

Content Elements

--redactix-code-bg, --redactix-code-color, --redactix-mark-bg, --redactix-blockquote-bg — inline and block styles.

See README for the complete list of 40+ CSS variables.

Image Upload & Gallery

Built-in support for drag & drop, paste, file picker, and image gallery with a unified PHP backend.

📩

Drag & Drop

Simply drag images from your desktop or file manager directly into the editor. Visual feedback shows where images will be inserted.

📋

Paste from Clipboard

Copy an image and press Ctrl+V to insert it. Works with screenshots, copied images from browsers, and image editors.

📁

File Picker

Click the Image button in the toolbar to open a modal with file upload zone. Drag & drop works there too.

🖼

Image Gallery

Browse and select from previously uploaded images. Square thumbnails with filename and file size. Optional delete functionality.

🔄

Replace Images

When editing an existing image, you can upload a new one to replace it or choose from the gallery. All settings are preserved.

🔗

Link Settings

Full control over image links: URL, target, and rel attributes (nofollow, sponsored, ugc). Same options as text links.

Setting Up Image Management

1

Configure Upload and Browse URLs

Pass the uploadUrl and browseUrl options. Both can point to the same unified script.

new Redactix({ selector: '.redactix', uploadUrl: '/redactix_images.php', browseUrl: '/redactix_images.php', // Enable delete button (requires PHP config) allowImageDelete: true });
2

Configure the PHP Script

The redactix_images.php script handles upload, browse, and delete operations. Configure settings at the top.

// redactix_images.php configuration $uploadDir = __DIR__ . '/uploads/'; $uploadUrlPrefix = '/uploads/'; $maxFileSize = 5 * 1024 * 1024; $allowDelete = false; // Set true to enable
3

Create the Uploads Directory

Make sure the uploads directory exists and is writable by the web server.

mkdir uploads chmod 755 uploads

API Endpoints

POST Upload

Send form data with image file. Returns JSON with src, srcset, alt, title, caption.

GET ?action=browse

Returns JSON array of images with src, filename, size, and optional metadata.

POST action=delete

Deletes image by file parameter. Only works if $allowDelete is true in PHP config.

Browse Response

Includes allowDelete flag so the JS knows whether to show delete buttons in the gallery.

Security Note

The included redactix_images.php is a basic example. For production use, add your own security measures: authentication, CSRF tokens, rate limiting, and file storage outside web root. Enable delete functionality with caution.

Server Response Format

Upload endpoint should return JSON with these fields:

{ "success": true, "src": "/uploads/abc123.jpg", // Required "srcset": "", // Optional "alt": "", // Optional "title": "", // Optional "caption": "" // Optional }

Why I Built This

The WYSIWYG landscape is broken. Here's what's wrong with it.

💰

Enterprise Pricing

CKEditor, Imperavi... Great features, but licensing costs can reach thousands per year. Not everyone has that budget.

💔

Stuck in 2012

jQuery-based editors with outdated UX. Clunky toolbars, messy HTML output full of inline styles and deprecated tags.

📦

Framework Lock-in

Modern alternatives require React, Vue, or 100+ npm dependencies. Good luck integrating that into a simple PHP project.

🎯 The Goal

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.

📄 Why HTML, Not Markdown?

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.

💦 Clean Output

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.

✨ Built with Vibe Coding

This entire editor was vibe-coded with Claude Opus 4.5. I described what I wanted, iterated on feedback, and watched the magic happen.


Is it perfect? No. Does it work exactly how I need it? Absolutely.

$20 AI costs
7000+ lines of code
3 days of “work”
0 dependencies

Even this landing page was vibe-coded in just a couple of prompts 😅

Author photo

Fëdor Ananin

Wannabe founder, marketer, and ludocoder 🎰

I travel with my cat and try to make this world a little bit better.