Skip to content

♻️ [Refactor] RichTextEditor 구조 리팩터링 — Serializer 모듈 분리 및 UITextView 기반 에디터 구현 (#917)#924

Open
LeeYeJi546 wants to merge 4 commits into
developfrom
refactor/917
Open

♻️ [Refactor] RichTextEditor 구조 리팩터링 — Serializer 모듈 분리 및 UITextView 기반 에디터 구현 (#917)#924
LeeYeJi546 wants to merge 4 commits into
developfrom
refactor/917

Conversation

@LeeYeJi546

@LeeYeJi546 LeeYeJi546 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

✨ PR 유형

리팩터링 (♻️ Refactor) — RichTextEditor 내부 구조 개편

📷 스크린샷 or 영상(UI 변경 시)

🛠️ 작업내용

  • ♻️ Markdown Serializer 모듈 분리 및 재구성
    • 기존 Views/MarkdownSerializer.swift 단일 파일을 Serializer/ 디렉토리로 분리
    • 역할별 파일 분리: MarkdownBlockParser, MarkdownInlineParser, MarkdownBlockSerializer, MarkdownInlineSerializer, MarkdownAttributeBuilder, MarkdownAutoformat, MarkdownEscaping, MarkdownHTMLDetector, MarkdownRegex, MarkdownSerializerTypes
  • ♻️ UITextView 기반 RichTextView 및 Coordinator 구현
    • RichTextViewRepresentable: SwiftUI UIViewRepresentable 래퍼
    • RichTextCoordinator: 에디터 핵심 Coordinator (델리게이트/이벤트 관리)
    • 기능별 Coordinator 확장 분리: +Blockquote, +List, +MarkdownAutoformat, +Placeholder, +Scroll
    • BlockquoteTextView 인용구 렌더링 수정, UITextView+MinimumHeight 익스텐션 추가
  • ♻️ RichText 에디터 Toolbar 컴포넌트 추가
    • DefaultToolbarView: 기본 텍스트 편집 툴바
    • TextSelectedToolbarView: 텍스트 선택 시 컨텍스트 툴바
    • TableCellToolbarView: 표 셀 편집 전용 툴바
  • ♻️ FormatPanelView 추가
    • 서식 적용 패널 UI 구현 (굵기/기울임/목록/인용구 등 포맷 옵션 제공)
  • 변경된 파일: 25개 (신규 23개, 수정 2개, 삭제 1개)

📋 추후 진행 상황

📌 리뷰 포인트

  • NoticeEditor/RichTextEditor/Serializer/ — Markdown 파싱/직렬화 로직 정확도 확인
  • NoticeEditor/RichTextEditor/NoticeRichText/ — UITextView Coordinator 이벤트 흐름 및 메모리 관리 확인
  • NoticeEditor/RichTextEditor/Toolbar/ — 3종 툴바 UI 레이아웃 및 액션 연결 확인
  • NoticeEditor/RichTextEditor/FormatPanel/ — 포맷 패널 UI 및 상태 바인딩 확인

✅ Checklist

PR이 다음 요구 사항을 충족하는지 확인해주세요!!!

- 구 위치(Views/MarkdownSerializer.swift)에서 Serializer/ 디렉토리로 분리
- 파서/직렬화기 역할별 파일 분리:
  MarkdownBlockParser, MarkdownInlineParser,
  MarkdownBlockSerializer, MarkdownInlineSerializer,
  MarkdownAttributeBuilder, MarkdownAutoformat,
  MarkdownEscaping, MarkdownHTMLDetector,
  MarkdownRegex, MarkdownSerializerTypes
- RichTextViewRepresentable: SwiftUI UIViewRepresentable 래퍼
- RichTextCoordinator: 에디터 핵심 Coordinator (델리게이트/이벤트 관리)
- 기능별 Coordinator 확장 분리:
  +Blockquote, +List, +MarkdownAutoformat,
  +Placeholder, +Scroll
- BlockquoteTextView: 인용구 렌더링 커스텀 서브클래스 수정
- UITextView+MinimumHeight: 최소 높이 보장 익스텐션
- DefaultToolbarView: 기본 텍스트 편집 툴바
- TextSelectedToolbarView: 텍스트 선택 시 컨텍스트 툴바
- TableCellToolbarView: 표 셀 편집 전용 툴바
- 서식 적용 패널 UI 구현 (굵기/기울임/목록/인용구 등 포맷 옵션 제공)
@LeeYeJi546 LeeYeJi546 linked an issue Jun 30, 2026 that may be closed by this pull request
5 tasks
@LeeYeJi546 LeeYeJi546 requested a review from JEONG-J June 30, 2026 15:34
@LeeYeJi546 LeeYeJi546 self-assigned this Jun 30, 2026
@LeeYeJi546 LeeYeJi546 added the 🔨 Refactor 코드 리팩토링 label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

♻️ Refactor: NoticeEditor/RichTextEditor 이식

1 participant