-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7267182
commit 0e84931
Showing
4,166 changed files
with
142,123 additions
and
106 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// import { convertToRaw } from "draft-js"; | ||
// import draftToHtml from "draftjs-to-html"; | ||
// import { useEffect, useState } from "react"; | ||
// import { EditorState } from "draft-js"; | ||
// import { Editor } from "react-draft-wysiwyg"; | ||
// import draftjsToHtml from "draftjs-to-html"; | ||
|
||
// import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; | ||
|
||
// import "./Draft.module.css"; | ||
|
||
// const Draft = () => { | ||
// const [editorState, setEditorState] = useState(EditorState.createEmpty()); | ||
// const [htmlString, setHtmlString] = useState(""); | ||
|
||
// const handleSave = () => { | ||
// const rawContentState = convertToRaw(editorState.getCurrentContent()); | ||
// const htmlOutput = draftToHtml(rawContentState); | ||
|
||
// // Here, you can save the `htmlOutput` to your backend or perform other tasks | ||
// console.log(htmlOutput); | ||
// }; | ||
|
||
// const updateTextDescription = async (state) => { | ||
// await setEditorState(state); | ||
// const html = draftjsToHtml(convertToRaw(editorState.getCurrentContent())); | ||
// setHtmlString(html); | ||
// }; | ||
|
||
// const uploadCallback = () => { | ||
// console.log("이미지 업로드"); | ||
// }; | ||
|
||
// return ( | ||
// <> | ||
// <div className="Draft_Container"> | ||
// <Editor | ||
// placeholder="게시글을 작성해주세요" | ||
// editorState={editorState} | ||
// onEditorStateChange={updateTextDescription} | ||
// toolbar={{ | ||
// image: { uploadCallback: uploadCallback }, | ||
// }} | ||
// localization={{ locale: "ko" }} | ||
// editorStyle={{ | ||
// height: "400px", | ||
// width: "80%", | ||
// border: "3px solid lightgray", | ||
// padding: "20px", | ||
// color: "black", | ||
// }} | ||
// /> | ||
// <button onClick={handleSave}>Save</button> | ||
// </div> | ||
// </> | ||
// ); | ||
// }; | ||
|
||
// export default Draft; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.wrapper-class { | ||
display: flex; | ||
width: 80%; | ||
|
||
flex-direction: row; | ||
} | ||
|
||
.editor-class { | ||
/* Styles for the editor input area */ | ||
border: 1px solid black; | ||
padding: 5px; | ||
min-height: 200px; | ||
} | ||
|
||
.toolbar-class { | ||
/* Styles for the toolbar */ | ||
width: 80%; | ||
} | ||
|
||
.Draft_Container { | ||
display: flex; | ||
} | ||
|
||
.rdw-option-wrapper { | ||
color: black !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.QnaForm_Container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100vw; | ||
height: 100vh; | ||
flex-direction: column; | ||
background-color: white; | ||
} | ||
|
||
.QnAFormContainer { | ||
width: 60vw; | ||
height: 80vh; | ||
border: 1px solid lightgray; | ||
/* justify-content: center; */ | ||
/* align-items: center; */ | ||
flex-direction: column; | ||
display: flex; | ||
margin-top: 11vh; | ||
border-radius: 20px; | ||
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); | ||
padding: 2vw; | ||
} | ||
|
||
form > h2 { | ||
margin-bottom: 1vh; | ||
} | ||
|
||
.QnAInput { | ||
} |
Oops, something went wrong.