Skip to content

[Feat/#369] 노트 내 툴바 추가 및 이미지 업로드 구현#370

Merged
pkm021118 merged 6 commits into
frontend/developfrom
frontend/feat/#369-note-toolbar
May 27, 2026
Merged

[Feat/#369] 노트 내 툴바 추가 및 이미지 업로드 구현#370
pkm021118 merged 6 commits into
frontend/developfrom
frontend/feat/#369-note-toolbar

Conversation

@sinji2102

Copy link
Copy Markdown

#️⃣연관된 이슈

closed #369

📝작업 내용

  • TipTap 에디터에 서식 툴바 추가 (H1~H3, Bold, Italic, Strike, Code, CodeBlock, BulletList, OrderedList, Blockquote, HorizontalRule, 이미지 업로드)
  • editable={false}일 때 툴바 숨김
  • S3 presigned URL 기반 이미지 업로드 지원 (파일 선택 / 클립보드 붙여넣기 / 드래그 앤 드롭)

src/components/commons/editor/EditorToolbar.tsx (신규)

  • 에디터 툴바 컴포넌트 구현

src/components/commons/editor/editor.tsx

  • EditorToolbar 연결, editable prop 으로 노출 조건 처리
  • handlePaste / handleDrop 핸들러 추가 — 이미지 파일 자동 업로드

src/components/commons/editor/uploadImage.ts (신규)

  • 브라우저 → /api/upload-image Route Handler 로 파일 전송
  • authStorage에서 토큰 읽어 Authorization 헤더 포함

src/app/api/upload-image/route.ts (신규)

  • 브라우저 직접 S3 PUT 시 발생하는 CORS 문제를 서버 사이드 프록시로 해결
  • 흐름: POST /v1/files/presigned-url → S3 PUT → POST /v1/files (confirm)
  • uploadUrl 반환 전 https:// 프로토콜 보정 + encodeURI (공백 등 특수문자 인코딩)

@pkm021118 pkm021118 merged commit 65f3eb5 into frontend/develop May 27, 2026
2 checks passed
@pkm021118 pkm021118 deleted the frontend/feat/#369-note-toolbar branch May 27, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants