@clearluv/editor
TypeScript icon, indicating that this package has built-in type declarations

1.8.0 • Public • Published
Introduction @clearluv/editor

An open-source WYSIWYG editor

License Novel.sh's GitHub repo

Live Demo · How to use · API · Setting Up Locally · Tech Stack · License


Live Demo

https://clearluv-editor.vercel.app

How to use

pnpm add @clearluv/editor

API

Property Description Type Default
classNames Semantic DOM class { root?: string; toolbar?: string; editor?: string } /
styles Semantic DOM style { root?: React.CSSProperties; toolbar?: React.CSSProperties; editor?: React.CSSProperties } /
content editor content string ""
autofocus editor focus postion or type "start" / "end" / "all" / number / boolean / null /
hiddenToast is hidden toast boolean false
onUploadFile transform upload file, callback base64/upload url ({type: "image", data: File}) => Promise void
onUpdate get editor content when editor update ({json, html, text}: {json: JSONContent; text: string; html: string; isEmpty: boolean;}) => void; void

Setting Up Locally

To run the app locally, you can run the following commands:

pnpm i
pnpm run build:cmp
pnpm run dev

Tech Stack

@clearluv/editor is built on the following stack:

License

Licensed under the AGPL license.

/@clearluv/editor/

    Package Sidebar

    Install

    npm i @clearluv/editor

    Weekly Downloads

    2

    Version

    1.8.0

    License

    AGPL

    Unpacked Size

    25.5 MB

    Total Files

    70

    Last publish

    Collaborators

    • clearluv