import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import { getWebsiteInterface } from "graphql/operations"; import { GetStaticProps } from "next"; import { GetWebsiteInterfaceQuery } from "graphql/operations-types"; import AppLayout from "components/AppLayout"; import { useCallback, useState } from "react"; import Markdawn from "components/Markdown/Markdawn"; import Script from "next/script"; type EditorProps = { langui: GetWebsiteInterfaceQuery; }; export default function Editor(props: EditorProps): JSX.Element { const langui = props.langui.websiteInterfaces.data[0].attributes; const handleInput = useCallback((e) => { setMarkdown(e.target.value); }, []); const [markdown, setMarkdown] = useState(""); const contentPanel = ( Editor { event.preventDefault(); let paste = event.clipboardData.getData("text/html"); paste = paste.replaceAll("", ""); paste = paste.replaceAll("", ""); paste = paste.replaceAll("", ""); paste = paste.replaceAll("", ""); paste = paste.replaceAll("", ""); paste = paste.replaceAll("", ""); event.target.value = paste; }} className="bg-mid rounded-xl p-8 w-full " value={markdown} /> Preview ); return ; } export const getStaticProps: GetStaticProps = async (context) => { if (context.locale) { const props: EditorProps = { langui: await getWebsiteInterface({ language_code: context.locale, }), }; return { props: props, }; } return { props: {} }; };