react-editor-toolkit
v0.0.8
Published
A lightweight, customizable rich text editor for React, supporting formatting, media embedding, and code blocks.
Maintainers
Readme
React Rich Text Editor
A lightweight, customizable rich text editor for React, supporting formatting, media embedding, and code blocks.
Usage
import { Editor } from "react-rich-texteditor";
function App() {
const handleChange = (content) => {
console.log("Editor content:", content);
};
return (
<Editor
tools={["bold", "italic", "link", "image"]}
fontFamily={["Arial", "Poppins"]}
onChange={handleChange}
/>
);
}Props
| Prop | Type | Default | Description |
| ------------ | --------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tools | string[] | [] | Toolbar tools to enable: headings, fontfamily, bold, italic, underline, strikethrough, link, youtube, image, pre, unorderedlist, orderedlist, alignleft, aligncenter, alignright, alignjustify, horizontalrule, clear |
| fontFamily | string[] | [] | Font family options for the dropdown (e.g., ['Arial', 'Poppins']) |
| onChange | (content: string) => void | undefined | Callback triggered on content change, receives HTML content |
Keywords
- React
- Rich Text
- Editor
- Component
This keeps it minimal and focused, omitting unnecessary details like extra packages or extended code examples. Save this as README.md in your project root. Let me know if you need further tweaks!
