1.0.2 • Published 10 months ago

@maciejkociela/website-editor v1.0.2

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

Web Editor

A lightweight and customizable React-based web editor component.

Installation

npm install web-editor
# or
yarn add web-editor

Usage

import { Editor } from 'web-editor';

function App() {
  const handleChange = (value: string) => {
    console.log('Editor content:', value);
  };

  return (
    <Editor
      initialValue="Hello, World!"
      onChange={handleChange}
      className="custom-editor"
    />
  );
}

Props

PropTypeDefaultDescription
initialValuestring''Initial content of the editor
onChange(value: string) => voidundefinedCallback function that is called when the editor content changes
classNamestring''Additional CSS class name for the editor container

Development

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start development server: npm run dev
  4. Build the package: npm run build

License

MIT

1.0.2

10 months ago

1.0.1

10 months ago