Skip to content

Commit

Permalink
texteditor removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Basir Khan committed Oct 5, 2023
1 parent 56b9ae4 commit eea7c76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 83 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"nodemailer": "^6.9.5",
"postcss": "8.4.24",
"preline": "^1.9.0",
"quill": "^1.3.7",
"react": "^18.2.0",
"react-apexcharts": "^1.3.7",
"react-dom": "^18.2.0",
Expand Down
88 changes: 7 additions & 81 deletions src/pages/admin/Texteditor.js
Original file line number Diff line number Diff line change
@@ -1,85 +1,11 @@
import React, { useEffect, useRef,useState } from "react";
// import Quill from "quill";
import 'react-quill/dist/quill.snow.css'
import dynamic from 'next/dynamic'
import theme from "../../../trc/theme/theme";
import FullLayout from "../../../trc/layouts/FullLayout";
import parse from 'html-react-parser';
import { ThemeProvider } from "@mui/material/styles";
import { set } from "mongoose";
// import "quill/dist/quill.snow.css";
// import { io } from "socket.io-client";
import React from 'react'

const Texteditor = () => {
const [Data, setData] = useState("");
const QuillNoSSRWrapper = dynamic(import('react-quill'), {
ssr: false,
loading: () => <p>Loading ...</p>,
})


const modules = {
toolbar: [
[{ header: '1' }, { header: '2' },{ font: [] }],
[{ size: [] }],
['bold', 'italic', 'underline', 'strike', 'blockquote'],
[
{ list: 'ordered' },
{ list: 'bullet' },
{ indent: '-1' },
{ indent: '+1' },
],
['link', 'image', 'video'],
['clean'],
],
clipboard: {
// toggle to add extra line breaks when pasting HTML:
matchVisual: false,
},
}
/*
* Quill editor formats
* See https://quilljs.com/docs/formats/
*/
const formats = [
'header',
'font',
'size',
'bold',
'italic',
'underline',
'strike',
'blockquote',
'list',
'bullet',
'indent',
'link',
'image',
'video',
]
const [value, setValue] = useState('');
const handleTextChange = (content, delta, source, editor) => {
// Update the value state with the HTML content of the editor
setValue(delta);
};
return (

<ThemeProvider theme={theme}>
<style jsx global>{`
.footer {
display: none;
}
.Navbar {
display: none;
}
`}</style>
<FullLayout>
<div>
<QuillNoSSRWrapper modules={modules} placeholder='Enter Your Text Here ...' value={value} formats={formats} theme="snow" className="h-[70vh]"/>
</div>
</FullLayout>
</ThemeProvider>
);
};
<div>
Coming Soon!
</div>
)
}

export default Texteditor;
export default Texteditor

0 comments on commit eea7c76

Please sign in to comment.