Skip to content

Commit

Permalink
Merge pull request #82 from Team-INSERT/hotfix/docs#2
Browse files Browse the repository at this point in the history
fix(docs): 스크롤 안되는 버그 수정
  • Loading branch information
Ubinquitous authored Mar 17, 2024
2 parents 777445c + b93f414 commit a3ee974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ const Editor = ({ contents = "", title = "", docsType = "", mode }: EditorPropsT
)}
<textarea
onKeyDown={(e) => setCursorPosition((e.target as HTMLTextAreaElement).selectionStart)}
onChange={(e) => setDocs((prev) => ({ ...prev, contents: autoClosingTag(e) }))}
value={docs.contents}
onChange={(e) =>
setDocs((prev) => ({ ...prev, contents: autoClosingTag(e).replaceAll("<br>", "\n") }))
}
value={docs.contents.replaceAll("<br>", "\n")}
placeholder="문서 내용을 입력해주세요. 사진 또는 동영상을 넣으려면 파일을 드래그&드롭하세요..."
className={styles.textarea[String(isExampleOpen)]}
/>
Expand Down
2 changes: 2 additions & 0 deletions components/Editor/style.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const previewBox = style({
background: theme.preview,
padding: "42px",
gap: "12px",
overflowY: "scroll",
...font.p1,
...flex.COLUMN_FLEX,
});
Expand Down Expand Up @@ -123,6 +124,7 @@ export const docsType = styleVariants<Record<string, ComplexStyleRule>>({
});

const textareaBase = style({
whiteSpace: "pre-wrap",
width: "100%",
marginTop: "12px",
...font.p1,
Expand Down

0 comments on commit a3ee974

Please sign in to comment.