0.1.5 • Published 1 year ago

@tradelunch/usequill v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

useQuill

use Quill on React with useQuill hook. I will update README.md

Example

import React, { useRef } from "react";
import { useQuill, QuillToolbarMemo } from "@tradelunch/usequill";

import "./assets/quill.bubble.css";
import "./assets/quill.snow.css";

type Props = {
    class?: string;
};

const QuillEditor = (props: Props) => {
    const toolBarRef = useRef<HTMLDivElement>(null);
    const containerRef = useRef<HTMLDivElement>(null);
    const boundsRef = useRef<HTMLDivElement>(null);

    useQuill({
        containerRef,
        boundsRef,
        toolBarRef,
    });

    return (
        <div
            style={{
                margin: "20px",
            }}
            key={`${props.class}`}
        >
            <QuillToolbarMemo ref={toolBarRef} />
            <div
                style={{
                    display: "block",
                }}
            >
                <div ref={boundsRef}>
                    <div className="editor" ref={containerRef} />
                </div>
            </div>
        </div>
    );
};

export default QuillEditor;
0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.2

1 year ago

1.0.0

1 year ago