Repository navigation
v1.0.5 - Image Plugin & Enhanced Media Support
v1.0.5 - Image Plugin & Enhanced Media Support
We're excited to announce React Editor v1.0.5 with powerful new media features and comprehensive documentation!
๐ What's New
๐ผ๏ธ Image Plugin
Insert images from URLs with a beautiful modal interface:
- Support for .jpg, .png, .gif, .webp, .svg formats
- Alt text for accessibility and SEO
- Optional custom dimensions (width/height)
- Responsive by default (max-width: 100%)
- Intuitive modal UI matching editor theme
<Editor plugins={[...defaultPlugins, imagePlugin]} />๐ฌ Enhanced Video Support
Direct video file embedding:
- Support for .mp4, .webm, .ogg video files
- HTML5 video element with native controls
- Works alongside YouTube and Vimeo
- Automatic format detection
- Responsive video player
// Now supports direct video URLs
<Editor plugins={defaultPlugins} />
// Add: https://example.com/video.mp4๐จ Custom Styling
New customStyles prop for complete CSS control:
<Editor
plugins={defaultPlugins}
customStyles={{
border: '2px solid #667eea',
borderRadius: '16px',
boxShadow: '0 10px 30px rgba(0, 0, 0, 0.1)',
}}
/>๐ Modal System Redesign
Beautiful, modern modal interface:
- Glassmorphism - Backdrop blur effect
- Smooth Animations - Cubic-bezier easing
- Gradient Buttons - With ripple effects
- Fully Responsive - Desktop, tablet, mobile
- Bottom Sheet - Mobile-friendly design
- Dark Mode - Complete theme support
๐ Complete Documentation
Comprehensive guides with live examples:
- Examples Overview - Interactive StackBlitz demos
- Advanced Examples - 15+ advanced patterns
- Custom Plugin Guide - Build your own plugins
- Next.js Integration - App Router & Pages Router
- Custom Styling Guide - Design system examples
๐ฎ Try It Live
Experience React Editor in action:
StackBlitz Demo: https://stackblitz.com/edit/rich-react-editor
GitBook Documentation: https://kuardscreative.gitbook.io/react-editor
๐ฆ Installation
npm install @akincand/react-editorOr with yarn:
yarn add @akincand/react-editor๐ Quick Start
import { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
return (
<Editor
plugins={defaultPlugins}
showSourceButton={true}
debugConsole={false}
/>
);
}โจ Features Showcase
Image Insertion
import { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
return <Editor plugins={defaultPlugins} />;
}
// Click the Image button in toolbar
// Enter: https://example.com/image.jpg
// Add alt text for accessibility
// Optionally set custom dimensionsVideo Embedding
// Supports multiple video sources:
// 1. YouTube
https://www.youtube.com/watch?v=dQw4w9WgXcQ
// 2. Vimeo
https://vimeo.com/123456789
// 3. Direct video files
https://example.com/video.mp4
https://example.com/video.webm
https://example.com/video.oggCustom Styling
import { Editor, defaultPlugins } from '@akincand/react-editor';
// Glassmorphism
<Editor
plugins={defaultPlugins}
customStyles={{
background: 'rgba(255, 255, 255, 0.1)',
backdropFilter: 'blur(10px)',
border: '1px solid rgba(255, 255, 255, 0.2)',
borderRadius: '16px',
}}
/>
// Neumorphic
<Editor
plugins={defaultPlugins}
customStyles={{
background: '#e0e5ec',
border: 'none',
borderRadius: '20px',
boxShadow: '20px 20px 60px #bebebe, -20px -20px 60px #ffffff',
}}
/>
// Gradient Border
<Editor
plugins={defaultPlugins}
customStyles={{
border: '3px solid transparent',
borderRadius: '16px',
backgroundImage: `
linear-gradient(white, white),
linear-gradient(135deg, #667eea 0%, #764ba2 100%)
`,
backgroundOrigin: 'border-box',
backgroundClip: 'padding-box, border-box',
}}
/>๐ง All Props
interface EditorConfig {
// Content
placeholder?: string;
defaultContent?: string;
readOnly?: boolean;
// Appearance
theme?: { mode: 'light' | 'dark' };
customStyles?: React.CSSProperties;
className?: string;
// Dimensions
height?: string | number;
maxHeight?: string | number;
minHeight?: string | number;
// Features
plugins?: EditorPlugin[];
toolbar?: ToolbarButton[];
showSourceButton?: boolean;
debugConsole?: boolean;
autoFocus?: boolean;
spellCheck?: boolean;
// Events
onChange?: (content: string) => void;
onBlur?: () => void;
onFocus?: () => void;
onReady?: (editor: EditorInstance) => void;
}๐ Bundle Size
Optimized for performance:
- Minified: ~48 KB
- Gzipped: ~15 KB
- Zero dependencies (React as peer)
- Tree-shakeable plugins
๐ฏ Built-in Plugins
All available by default:
- basicFormattingPlugin - Bold, Italic, Underline, Strikethrough
- headingsPlugin - H1, H2, H3, H4, H5, H6
- listsPlugin - Ordered & Unordered Lists
- alignmentPlugin - Left, Center, Right, Justify
- linksPlugin - Insert & Remove Links
- videoPlugin - YouTube, Vimeo, Direct Videos
- imagePlugin - โจ NEW - Image Insertion
import {
Editor,
defaultPlugins,
// Or import individually:
basicFormattingPlugin,
headingsPlugin,
listsPlugin,
alignmentPlugin,
linksPlugin,
videoPlugin,
imagePlugin
} from '@akincand/react-editor';๐ Bug Fixes
Video Embedding
- โ Fixed videos not inserting into editor
- โ Removed whitespace from HTML strings
- โ Improved selection handling
- โ Videos insert at end when no selection
Modal UI
- โ Fixed responsiveness issues
- โ Better input field styling
- โ Improved button hover states
- โ Fixed footer background colors
- โ Better spacing across breakpoints
๐ก Examples
Basic Usage
import { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
return <Editor plugins={defaultPlugins} />;
}With State Management
import { useState } from 'react';
import { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
const [content, setContent] = useState('');
return (
<>
<Editor
plugins={defaultPlugins}
onChange={setContent}
/>
<div>Characters: {content.length}</div>
</>
);
}With Dark Mode
import { useState } from 'react';
import { Editor, defaultPlugins } from '@akincand/react-editor';
function App() {
const [theme, setTheme] = useState<'light' | 'dark'>('light');
return (
<>
<button onClick={() => setTheme(prev => prev === 'light' ? 'dark' : 'light')}>
Toggle Theme
</button>
<Editor
plugins={defaultPlugins}
theme={{ mode: theme }}
/>
</>
);
}Next.js Integration
'use client';
import dynamic from 'next/dynamic';
const Editor = dynamic(
() => import('@akincand/react-editor').then(mod => mod.Editor),
{ ssr: false }
);
export default function Page() {
return <Editor plugins={defaultPlugins} />;
}๐ Documentation
New Pages
Updated Pages
- Image Plugin Documentation
- Video Plugin Documentation
- Configuration Reference
- Modal Component Guide
๐ Links
- npm: https://www.npmjs.com/package/@akincand/react-editor
- GitHub: https://github.com/AkincanD/react-editor
- Documentation: https://kuardscreative.gitbook.io/react-editor
- Live Demo: https://stackblitz.com/edit/rich-react-editor
๐ Credits
Built with โค๏ธ by AkincanD
๐ Changelog
See CHANGELOG.md for a complete list of changes.
๐ What's Next?
Upcoming features:
- Table plugin
- Image upload support
- Drag & drop
- Collaborative editing
- Mobile toolbar optimization
๐ฌ Feedback
Have feedback or suggestions?
- Open an issue
- Start a discussion
- Star the repo if you like it! โญ
Full Changelog: v1.0.4...v1.0.5