@fabrainz_dev/editor
v1.3.6
Published
A Rich Text Editor for Document Creation
Readme
@fabrainz_dev/editor
A rich text editor built with React and TypeScript.
Installation
npm install @fabrainz_dev/editorUsage
import { CommonEditor } from "@fabrainz_dev/editor";
import "@fabrainz_dev/editor/styles";
function App() {
const handleSave = (data: any) => {
console.log("Saved:", data);
};
return <CommonEditor id={1} content={[]} onSave={handleSave} />;
}Props
| Prop | Type | Required | Description |
| ------------- | ---------- | -------- | ------------------------- |
| id | number | Yes | Editor identifier |
| content | array | Yes | Editor content |
| onSave | function | Yes | Save callback |
| readOnly | boolean | No | Read-only mode |
| customProps | object | No | Custom element properties |
Development
# Install dependencies
npm install
# Start development
npm run dev
# Build
npm run build
# Run tests
npm testLicense
MIT
