react-text-editor-kit
Version:
React Text Editor Kit is a customizable rich text editor component for React applications. It provides a flexible and easy-to-use interface for users to create and edit content with various formatting options. And also easy to integrate in react applicati
31 lines (29 loc) • 827 B
JSX
import React, { useState } from "react";
import ReactEditorKit from "../ReactEditorKit";
export default function AnOtherPage() {
const [value, setValue] = useState("");
const handleSubmit = (e) => {};
console.log(
value,
"test new data data data data data data data data data data data data data data data",
);
return (
<>
<form onSubmit={handleSubmit}>
<ReactEditorKit
value={value}
onChange={setValue}
mainProps={{ className: "red" }}
placeholder="Please Write Something..."
apiKey={"f2a84881-3ad9-4707-a26b-039b5bb179d7"}
height={"400px"}
/>
</form>
{value && (
<div>
<div dangerouslySetInnerHTML={{ __html: value }} />
</div>
)}
</>
);
}