Skip to content

Commit

Permalink
Merge pull request #174 from MeeTeamNumdle/release-1.0
Browse files Browse the repository at this point in the history
fix: 텍스트 에디터 string 타입으로 인한 에러 수정 및 들여쓰기 반영
  • Loading branch information
prgmr99 authored May 9, 2024
2 parents 50d5de8 + dc9391c commit 5982e94
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ const DetailedInformation = () => {
const { validMessage, isValid } = useValid(formData);

const preventInput = (event: React.KeyboardEvent<HTMLInputElement>) => {
// 입력을 허용하지 않을 키 코드를 배열에 정의합니다.
const forbiddenKeys = ['"', "'"];
const forbiddenKeys = ['\t'];

// 입력 이벤트가 허용되지 않는 키를 누르면 이벤트를 취소합니다.
if (forbiddenKeys.includes(event.key)) {
event.preventDefault();
}
};

const onChangeContents = (contents: string) => {
const sanitizedContent = contents.replace(/ class="[^"]*ql-indent-1[^"]*"/g, '');
setFormData({ ...formData, content: sanitizedContent });
setFormData({ ...formData, content: contents });
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ const RecruitDescription = styled.article`
padding-left: 2rem;
}
.ql-indent-1 {
margin-left: 5rem;
}
.ql-indent-2 {
margin-left: 10rem;
}
.ql-indent-3 {
margin-left: 15rem;
}
em {
font-style: italic;
}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/recruit/recruitDetailPage/RecruitDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ const RecruitDetailPage = () => {
navigate(`/recruitment/postings/edit/${pageNum}`);
};

console.log(detailedData);
console.log(typeof detailedData);

useEffect(() => {
fixModalBackground(
isModal || isCancel || isClose || isDelete.isDelete || isNeedLogin.isOpen || isPostingDelete
Expand Down

0 comments on commit 5982e94

Please sign in to comment.