Skip to content

Kaidash/lexical-paste-editor

Repository files navigation

Lexical paste editor

Features

  • 🔧  Easy Customization: Effortlessly render custom content with straightforward customization options.

  • 💪  TypeScript Integration: Benefit from the advantages of Typescript for enhanced code reliability.

  • 🎨  TailwindCSS Styling: Achieve a sleek and modern design with styling powered by TailwindCSS.

Installation

Using npm

  1. Install the package:
  npm install lexical-paste-editor
  1. Import the timeline styles in your main JavaScript file:
  import "lexical-paste-editor/dist/style.css";

Usage

See src/App.tsx

<LexicalPasteEditor/> Props

Below are the available configuration options for the component:

Name Type Description
pasteText string Text which you paste
initHtml string Restore html text in the editor
onUpdateText func Returns text in HTML format
onSearchImages Promise Search images list by name
onUploadImage Promise Returns base64 image item which was uploaded. Return s3/GCS url
onRemoveImage Promise Returns src deleted image

🤝Contributing

We welcome contributions! If you find a bug or have an idea for improvement, please open an issue or submit a pull request on Github.

  1. Fork it
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -am 'Add feature')
  4. Push to the branch (git push origin new-feature)
  5. Create a new Pull Request

Author ✨

💻   NICK KAIDASH

Licence

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages