Skip to content

feat : ContentCreateForm Editor 생성 #137

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import ContentCreateForm from "./ContentCreateForm";

export default {
title: 'Container/ContentCreateForm',
component: ContentCreateForm,
};

export const all = () => {
return (
<>
<ContentCreateForm />
</>
)
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

import { Editor } from '@toast-ui/react-editor';
import '@toast-ui/editor/dist/toastui-editor.css';
import { Layout, HorizonLine, InputTitle } from './ContentCreatreForm.styles';

export interface ContentCreateFormProps {
}

const ContentCreateForm = () => {
return (
<>
<Layout>
<InputTitle placeholder='제목을 입력하세요'/>
<HorizonLine />
<Editor
placeholder='텍스트 또는 콘텐츠를 추가해주세요'
previewStyle="vertical" // 미리보기 스타일 지정
height="300px" // 에디터 창 높이
initialEditType="wysiwyg" // 초기 입력모드 설정(디폴트 markdown)
toolbarItems={[
// 툴바 옵션 설정
['heading', 'bold', 'italic', 'strike'],
['hr', 'quote'],
['ul', 'ol', 'task', 'indent', 'outdent'],
['table', 'image', 'link'],
['code', 'codeblock']
]}
></Editor>
</Layout>
</>
)
};

export default ContentCreateForm;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import styled from 'styled-components';

export const Layout = styled.div`
display ; flex;
flex-direction: column;
gap: 10%;
`
export const InputTitle = styled.input`
font-size: 20px;
border: none;
outline: none;
`

export const HorizonLine = styled.div`
width: "100%",
borderBottom: "5px solid #aaa",
lineHeight: "0.1em",
margin: "10px 0 20px",
`
Loading