-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/text-editor-change #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
342c7db
install: ํ์ ํจํค์ง ์ธ์คํจ
hyoloui 158e3bd
delete(toastUI): ๊ธฐ์กด ์๋ํฐ ์ญ์
hyoloui 7537290
feat(PostEditor): MDEditor ์ถ๊ฐ
hyoloui 4eed639
install: ํ์ ํจํค์ง ์ธ์คํจ
hyoloui 904a088
feat(DetailContent): ๋ทฐ์ด ์ ์ฉ
hyoloui 9f884da
fix(DetailContent): ๋ทฐ์ด ๋์ด ์์
hyoloui 8aef73a
fix(Post): content ์ด๋์
string ์์
hyoloui c22a4f2
feat(PostEditor): MDEditor ์ด๋ฏธ์ง ์
๋ก๋ ์ถ๊ฐ
hyoloui d5a14f6
fix(postId): post_id๋ฅผ ์ง์ ํฉ๋๋ค.
hyoloui b0cf9d6
update: ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น ๋ฐ ์ญ์
hyoloui 2ba907f
fix(PostEditor): build error ํด๊ฒฐ
hyoloui adf14dc
fix(console): ์ฝ์ ์ ๊ฑฐ
hyoloui 015848a
feat(PostEditor): commands toolbar ์์
hyoloui 1c177bc
fix(PostEditor): PR ํผ๋๋ฐฑ ๋ฐ์
hyoloui 6441411
fix(PostEditor): PR ํผ๋๋ฐฑ ๋ฐ์
hyoloui 79a9c27
fix(PostEditor): PR ํผ๋๋ฐฑ ๋ฐ์
hyoloui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,22 +1,24 @@ | ||
import "@toast-ui/editor/dist/toastui-editor-viewer.css"; | ||
import "prismjs/themes/prism.css"; | ||
import "@toast-ui/editor-plugin-code-syntax-highlight/dist/toastui-editor-plugin-code-syntax-highlight.css"; | ||
import "@uiw/react-md-editor/markdown-editor.css"; | ||
import "@uiw/react-markdown-preview/markdown.css"; | ||
|
||
import { Viewer } from "@toast-ui/react-editor"; | ||
import codeSyntaxHighlightPlugin from "@toast-ui/editor-plugin-code-syntax-highlight"; | ||
import Prism from "prismjs"; | ||
import dynamic from "next/dynamic"; | ||
import styled from "styled-components"; | ||
|
||
const MarkdownPreview = dynamic(() => import("@uiw/react-markdown-preview"), { | ||
ssr: false, | ||
}); | ||
|
||
interface DetailContentProps { | ||
content: string; | ||
} | ||
|
||
const DetailContent = ({ content }: DetailContentProps) => { | ||
return ( | ||
<Viewer | ||
initialValue={content} | ||
plugins={[[codeSyntaxHighlightPlugin, { highlighter: Prism }]]} | ||
/> | ||
); | ||
return <PreviewContent source={content} />; | ||
}; | ||
|
||
const PreviewContent = styled(MarkdownPreview)` | ||
width: 60rem; | ||
padding: 1rem; | ||
`; | ||
|
||
export default DetailContent; |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.