0.0.19 • Published 4 months ago
chocho-lexicaleditor v0.0.19
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
Prop | Type | Description |
---|---|---|
placeholder | string | Placeholder text inside the editor |
onChange | (value: string) => void | Callback triggered when content changes |
defaultValue | string | Initial 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
4 months ago
0.0.19
4 months ago
0.0.17
4 months ago
0.0.16
5 months ago
0.0.15
5 months ago
0.0.14
5 months ago
0.0.13
5 months ago
0.0.12
5 months ago
0.0.11
5 months ago
0.0.10
5 months ago
0.0.9
5 months ago
0.0.8
5 months ago
0.0.7
5 months ago
0.0.6
5 months ago
0.0.5
5 months ago
0.0.4
5 months ago
0.0.3
5 months ago
0.0.2
5 months ago
0.0.1
5 months ago