0.0.19 • Published 5 months ago

chocho-lexicaleditor v0.0.19

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

chocho-lexicaleditor

A rich text editor built using the Lexical library, designed for seamless integration into React applications.

Features

  • Lightweight and highly extensible
  • Uses the Lexical library for fast, accessible, and reliable text editing
  • Fully typed with TypeScript support
  • Supports custom styling and theming

Installation

Install the package using npm or yarn:

npm install chocho-lexicaleditor
# or
yarn add chocho-lexicaleditor

Usage

Import the Editor Component

import React from "react";
import { Editor } from "chocho-lexicaleditor";
import "chocho-lexicaleditor/style";

const App = () => {
    return (
        <div>
            <h1>My Rich Text Editor</h1>
            <Editor />
        </div>
    );
};

export default App;

Styling

To apply the default styles, import the CSS file inside your global stylesheet or component:

@import "chocho-lexicaleditor/style";

API

Editor Props

PropTypeDescription
placeholderstringPlaceholder text inside the editor
onChange(value: string) => voidCallback triggered when content changes
defaultValuestringInitial editor content

Example usage:

<Editor placeholder="Start typing..." onChange={(value) => console.log(value)} />

Contributing

Contributions are welcome! Feel free to fork this repository, submit issues, or open pull requests.

License

This project is licensed under the MIT License.

0.0.18

5 months ago

0.0.19

5 months ago

0.0.17

5 months ago

0.0.16

6 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago