import React, { useState } from "react";
import ReactQuill from "react-quill";
import "react-quill/dist/quill.snow.css";
export default function Editor() {
const [editorValue, setEditorValue] = useState("");
const handleChange = (value) => {
setEditorValue(value);
};
const modules = {
toolbar: [
[{ header: [1, 2, false] }],
["bold", "italic", "underline", "strike", "blockquote"],
[{ list: "ordered" }, { list: "bullet" }],
[{ align: [] }], // 글자 정렬 옵션
["link", "image", "video"],
["clean"],
],
clipboard: {
matchVisual: false,
},
};
return (
<div>
<ReactQuill
value={editorValue}
onChange={handleChange}
modules={modules}
/>
</div>
);
}