0.1.0 • Published 2 years ago

quill-cell v0.1.0

Weekly downloads
-
License
LGPL-3.0
Repository
github
Last release
2 years ago

Quill Cell

HTML Rich-text editor element based on Web Components, WebCell v2 & Quill.

NPM Dependency CI & CD

NPM

Usage

import { documentReady, render, createCell } from 'web-cell';
import { QuillCellProps, QuillCell } from 'quill-cell';

const upload: QuillCellProps['upload'] = async file => {
    const response = await fetch('/file', {
        method: 'POST',
        body: file
    });
    const { path } = await response.json();

    return path;
};

documentReady.then(() =>
    render(
        <QuillCell name="content" upload={upload}>
            Operate after selecting
        </QuillCell>
    )
);