0.0.1 • Published 12 months ago

@kishorem/react-rich-texteditor v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

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

PropTypeDefaultDescription
toolsstring[][]Toolbar tools to enable: headings, fontfamily, bold, italic, underline, strikethrough, link, youtube, image, pre, unorderedlist, orderedlist, alignleft, aligncenter, alignright, alignjustify, horizontalrule, clear
fontFamilystring[][]Font family options for the dropdown (e.g., ['Arial', 'Poppins'])
onChange(content: string) => voidundefinedCallback 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!