JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28114F
  • License MIT

A simple React rich text editor component

Package Exports

  • scrivly
  • scrivly/dist/index.esm.js
  • scrivly/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scrivly) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Simple Rich Text Editor

A lightweight, customizable rich text editor for React applications built on Draft.js.

React Simple Rich Text Editor

🚀 Features

  • 📝 Basic text formatting (Bold, Italic, Strikethrough)
  • 🔤 Heading support (H1, H2, H3)
  • 📋 Lists (Ordered and Unordered)
  • 🔗 Link insertion
  • 📷 Image embedding from URL
  • 🎬 Media embedding (YouTube, Vimeo)
  • 💻 Code and Code Block formatting
  • 🎨 Customizable styling
  • 📱 Responsive design
  • Lightweight and performant

📦 Installation

# Using npm
npm install scrivly-editor

# Using yarn
yarn add scrivly-editor

# Using pnpm
pnpm add scrivly-editor

🛠 Usage

import React, { useState } from "react";
import { ScrivlyEditor } from "scrivly-editor";

const App = () => {
  const [content, setContent] = useState("");

  return (
    <div>
      <h2>Rich Text Editor</h2>
      <ScrivlyEditor value={content} onChange={setContent} />
      <h3>Preview:</h3>
      <div dangerouslySetInnerHTML={{ __html: content }} />
    </div>
  );
};

export default App;

🎨 Customization

You can customize the editor using props:

<ScrivlyEditor
  value={content}
  onChange={setContent}
  toolbarOptions={["bold", "italic", "underline", "link", "image"]}
  placeholder="Start typing..."
  className="custom-editor"
/>

🛡️ License

This project is licensed under the MIT License. See the LICENSE file for more details.

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to submit a PR or open an issue.

📧 Contact

For any questions or feedback, reach out via GitHub Issues.