2022-11-29 14:19:39 +00:00
|
|
|
import React from "react";
|
|
|
|
import dynamic from "next/dynamic";
|
2022-11-19 14:21:26 +00:00
|
|
|
|
2022-11-29 14:19:39 +00:00
|
|
|
const RichTextEditor = dynamic(() => import("../components/lexical/editor"), {
|
|
|
|
ssr: false,
|
|
|
|
});
|
2022-11-19 14:21:26 +00:00
|
|
|
|
2022-11-29 14:19:39 +00:00
|
|
|
const LexicalViewer = dynamic(() => import("../components/lexical/viewer"), {
|
|
|
|
ssr: false,
|
|
|
|
});
|
2022-11-19 14:21:26 +00:00
|
|
|
|
2022-11-29 14:19:39 +00:00
|
|
|
const Home = () => {
|
|
|
|
const [value, setValue] = React.useState("");
|
|
|
|
const onChange: any = (value: any) => {
|
|
|
|
console.log(value);
|
|
|
|
setValue(value);
|
|
|
|
};
|
2022-11-19 14:21:26 +00:00
|
|
|
return (
|
2022-11-29 14:19:39 +00:00
|
|
|
<>
|
|
|
|
<RichTextEditor onChange={onChange} value={value} id="editor" />
|
|
|
|
<LexicalViewer id="institution_viewer" value={value} />
|
|
|
|
</>
|
2022-11-19 14:21:26 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2022-11-29 14:19:39 +00:00
|
|
|
export default Home;
|