NextJS_DOC/pages/Editor.jsx

33 lines
783 B
React
Raw Normal View History

2023-03-24 10:11:04 +00:00
import Editor from "@/Editor/Ckeditor";
import React, { useState, useEffect } from "react";
import { Col, Container, Row } from "react-bootstrap";
export default function App() {
const [editorLoaded, setEditorLoaded] = useState(false);
const [data, setData] = useState("");
useEffect(() => {
setEditorLoaded(true);
}, []);
return (
<>
<Container fluid>
<Row>
<Col xs={12} sm={12} md={12} lg={10} xxl={12} className="mx-auto">
<Editor
name="description"
onChange={(data) => {
setData(data);
}}
editorLoaded={editorLoaded}
/>
{/* {JSON.stringify(data)} */}
</Col>
</Row>
</Container>
</>
);
}