
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
react-quill-editors
Advanced tools
A fully customizable React rich text editor with no external dependencies. Features a comprehensive toolbar similar to popular Markdown editors with file operations, media insertion, and advanced formatting capabilities.
A fully customizable React rich text editor with no external dependencies. Built from scratch using only React and native browser APIs. Features a comprehensive toolbar similar to popular Markdown editors with file operations, media insertion, and advanced formatting capabilities.
npm install react-quill-editors
import { RichTextEditor } from 'react-quill-editors';
function App() {
const [content, setContent] = useState('');
return (
<RichTextEditor
features={{
// File operations
save: true,
delete: true,
close: true,
// Text formatting
heading: true,
bold: true,
italic: true,
underline: true,
strikethrough: true,
// Font controls
fontSize: true,
fontFamily: true,
// Colors
color: true,
bgColor: true,
// Alignment
align: true,
// Lists
lists: true,
// Media
link: true,
image: true,
video: true,
// Special formatting
code: true,
quote: true,
horizontalRule: true,
// Additional features
attachment: true,
preview: true,
}}
value={content}
onChange={setContent}
onSave={() => console.log('Saving...')}
onDelete={() => console.log('Deleting...')}
onClose={() => console.log('Closing...')}
onPreview={() => console.log('Preview...')}
placeholder="Start typing..."
/>
);
}
Prop | Type | Default | Description |
---|---|---|---|
features | EditorFeatures | {} | Object to enable/disable specific features |
value | string | '' | The HTML content of the editor |
onChange | (value: string) => void | - | Callback when content changes |
placeholder | string | 'Start typing...' | Placeholder text when editor is empty |
className | string | '' | Additional CSS class name |
style | React.CSSProperties | {} | Inline styles for the editor |
readOnly | boolean | false | Makes the editor read-only |
disabled | boolean | false | Disables the editor completely |
onSave | () => void | - | Callback for save button |
onDelete | () => void | - | Callback for delete button |
onClose | () => void | - | Callback for close button |
onPreview | () => void | - | Callback for preview button |
Category | Feature | Prop | Description |
---|---|---|---|
File Operations | |||
Save | save: true | Save button with callback | |
Delete | delete: true | Delete button with callback | |
Close | close: true | Close button with callback | |
Text Formatting | |||
Heading | heading: true | Insert headings (H1-H6) | |
Bold | bold: true | Toggle bold text | |
Italic | italic: true | Toggle italic text | |
Underline | underline: true | Toggle underlined text | |
Strikethrough | strikethrough: true | Toggle strikethrough text | |
Font Controls | |||
Font Size | fontSize: true | Change text size (8px-36px) | |
Font Family | fontFamily: true | Change font family | |
Colors | |||
Text Color | color: true | Change text color | |
Background Color | bgColor: true | Change background color | |
Alignment | |||
Alignment | align: true | Text alignment (left, center, right, justify) | |
Lists | |||
Lists | lists: true | Bullet and numbered lists | |
Media | |||
Link | link: true | Insert links | |
Image | image: true | Insert images | |
Video | video: true | Insert videos | |
Special Formatting | |||
Code | code: true | Insert code blocks | |
Quote | quote: true | Insert blockquotes | |
Horizontal Rule | horizontalRule: true | Insert horizontal rules | |
Additional Features | |||
Attachment | attachment: true | File attachment functionality | |
Preview | preview: true | Preview mode with callback |
import { RichTextEditor } from 'react-quill-editors';
function BasicEditor() {
const [content, setContent] = useState('');
return (
<RichTextEditor
features={{
bold: true,
italic: true,
underline: true,
}}
value={content}
onChange={setContent}
/>
);
}
import { RichTextEditor } from 'react-quill-editors';
function MarkdownStyleEditor() {
const [content, setContent] = useState('');
const handleSave = () => {
console.log('Saving content:', content);
};
const handleDelete = () => {
if (confirm('Are you sure?')) {
setContent('');
}
};
return (
<RichTextEditor
features={{
// File operations
save: true,
delete: true,
close: true,
// Text formatting
heading: true,
bold: true,
italic: true,
underline: true,
strikethrough: true,
// Font controls
fontSize: true,
fontFamily: true,
// Colors
color: true,
bgColor: true,
// Alignment
align: true,
// Lists
lists: true,
// Media
link: true,
image: true,
video: true,
// Special formatting
code: true,
quote: true,
horizontalRule: true,
// Additional features
attachment: true,
preview: true,
}}
value={content}
onChange={setContent}
onSave={handleSave}
onDelete={handleDelete}
placeholder="Start typing your content..."
/>
);
}
import { RichTextEditor } from 'react-quill-editors';
function ReadOnlyEditor() {
const content = '<p><strong>This is read-only content</strong> with <em>various formatting</em>.</p>';
return (
<RichTextEditor
features={{
bold: true,
italic: true,
underline: true,
fontSize: true,
fontFamily: true,
color: true,
align: true,
}}
value={content}
readOnly={true}
/>
);
}
import { RichTextEditor } from 'react-quill-editors';
function CustomStyledEditor() {
const [content, setContent] = useState('');
return (
<RichTextEditor
features={{
bold: true,
italic: true,
color: true,
align: true,
lists: true,
}}
value={content}
onChange={setContent}
className="custom-editor"
style={{
border: '2px solid #007bff',
borderRadius: '8px',
minHeight: '400px',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
}}
/>
);
}
The editor includes a comprehensive color palette with 15 predefined colors:
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Clean build directory
npm run clean
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Akshay Bhalala
document.execCommand()
APIFAQs
A fully customizable React rich text editor with no external dependencies. Features a comprehensive toolbar similar to popular Markdown editors with file operations, media insertion, and advanced formatting capabilities.
The npm package react-quill-editors receives a total of 350 weekly downloads. As such, react-quill-editors popularity was classified as not popular.
We found that react-quill-editors demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.