Skip to content
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

YG-39 [feat]: editor #27

Merged
merged 4 commits into from
Jun 6, 2024
Merged
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
122 changes: 82 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,46 +177,88 @@ deploy

<h3>Stacks</h3>

<h4>Languages</h4>

<p align="center">
<img src="https://img.shields.io/badge/HTML5-E34F26?style=flat-square&logo=html5&logoColor=white">
<img src="https://img.shields.io/badge/CSS3-1572B6?style=flat-square&logo=css3cript&logoColor=white">
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white">
</p>

<h4>Framework</h4>

<p align="center">
<img src="https://img.shields.io/badge/nextjs-000?style=flat-square&logo=nextjs&logoColor=white">
</p>

<h4>Library</h4>

<p align="center">
<img src="https://img.shields.io/badge/nextUI-000?style=flat-square&logo=nextui&logoColor=white">
<img src="https://img.shields.io/badge/tailwindcss-06B6D4?style=flat-square&logo=tailwindcss&logoColor=white">
<img src="https://img.shields.io/badge/zod-3E67B1?style=flat-square&logo=zod&logoColor=white">
<img src="https://img.shields.io/badge/reactquery-FF4154?style=flat-square&logo=reactquery&logoColor=white">
<img src="https://img.shields.io/badge/storybook-FF4785?style=flat-square&logo=storybook&logoColor=white">
</p>

<h4>Communications</h4>

<p align="center">
<img src="https://img.shields.io/badge/GitHub-000000?style=flat-square&logo=github&logoColor=white">
<img src="https://img.shields.io/badge/discord-5865F2?style=flat-square&logo=discord&logoColor=white">
<img src="https://img.shields.io/badge/jira-0052CC?style=flat-square&logo=jira&logoColor=white">
<img src="https://img.shields.io/badge/notion-000000?style=flat-square&logo=notion&logoColor=white">
</p>

<h4>Tools</h4>

<p align="center">
<img src="https://img.shields.io/badge/figma-F24E1E?style=flat-square&logo=figma&logoColor=white">
<img src="https://img.shields.io/badge/Visual%20Studio%20Code-007ACC.svg?&style=for-the-badge&logo=Visual%10Studio%10Code&logoColor=white">
<img src="https://img.shields.io/badge/NPM-CB3837?style=flat-square&logo=npm&logoColor=white">
</p>
<table>
<tr>
<td><h4>Languages</h4></td>
<td>
<img src="https://img.shields.io/badge/HTML5-E34F26?style=flat-square&logo=html5&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/CSS3-1572B6?style=flat-square&logo=css3&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white">
</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><h4>Framework</h4></td>
<td>
<img src="https://img.shields.io/badge/next.js-000?style=flat-square&logo=next.js&logoColor=white">
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><h4>Library</h4></td>
<td>
<img src="https://img.shields.io/badge/nextUI-000?style=flat-square&logo=nextui&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/tailwindcss-06B6D4?style=flat-square&logo=tailwindcss&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/zod-3E67B1?style=flat-square&logo=zod&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/reactquery-FF4154?style=flat-square&logo=reactquery&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/storybook-FF4785?style=flat-square&logo=storybook&logoColor=white">
</td>
<td></td>
</tr>
<tr>
<td><h4>Communications</h4></td>
<td>
<img src="https://img.shields.io/badge/GitHub-000000?style=flat-square&logo=github&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/discord-5865F2?style=flat-square&logo=discord&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/jira-0052CC?style=flat-square&logo=jira&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/notion-000000?style=flat-square&logo=notion&logoColor=white">
</td>
<td></td>
<td></td>
</tr>
<tr>
<td><h4>Tools</h4></td>
<td>
<img src="https://img.shields.io/badge/figma-F24E1E?style=flat-square&logo=figma&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/Visual%20Studio%20Code-007ACC?style=flat-square&logo=Visual%20Studio%20Code&logoColor=white">
</td>
<td>
<img src="https://img.shields.io/badge/NPM-CB3837?style=flat-square&logo=npm&logoColor=white">
</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>




<br/>
<br/>
27 changes: 27 additions & 0 deletions app/(afterLogin)/createPost/_components/editorQuill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"use client"

import dynamic from "next/dynamic"
import "react-quill/dist/quill.snow.css"

const ReactQuill = dynamic(() => import("react-quill"), { ssr: false })

export const QuillEditor = () => {
return (
<ReactQuill
className="quill-editor"
modules={{
toolbar: [
["bold", "italic", "underline", "strike", "blockquote"],
[{ header: [1, 2, 3, 4, 5, 6, false] }],
[{ font: [] }],
[{ direction: "rtl" }],
["image", "link"],
[{ list: "ordered" }, { list: "bullet" }],
[{ color: [] }, { background: [] }], // dropdown with defaults from theme
[{ align: [] }],
["clean"],
],
}}
/>
)
}
9 changes: 8 additions & 1 deletion app/(afterLogin)/freeForm/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { QuillEditor } from "../createPost/_components/editorQuill"

const Page = () => {
return <div>Free Form</div>
return (
<div>
<p>Free Form</p>
<QuillEditor />
</div>
)
}
export default Page
16 changes: 16 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ body {
@apply bg-SYSTEM-beige;
}

.quill-editor {
@apply bg-SYSTEM-white w-[900px] border-0 rounded-xl;
}

.quill-editor .ql-snow {
@apply border-none h-[80px] flex justify-center items-center !important;
}

.quill-editor .ql-editor {
@apply border-none min-h-[200px];
}

.quill-editor .ql-container {
@apply absolute top-[19%] left-0 w-[900px] min-h-[200px] bg-SYSTEM-white rounded-xl !important;
}

@layer utilities {
.text-balance {
text-wrap: balance;
Expand Down
Loading