← 목록
기타 2026-05-19 2KB 읽기 2분

CrownyDoc 편집기 약점 보완 — 각주/미주 + 단락 간격

개요

CrownyDoc Office Suite의 워드프로세서 약점 #3(각주/미주)과 #7(단락 간격)을 구현하여 MS Word/Google Docs 동등 수준으로 개선했다.

무엇을 했는지

약점 #7: 단락 간격 설정 (MEDIUM)

editor-core.js에 3개 메서드 추가:
  • setLineSpacing(value) — 선택 단락의 line-height 설정 (1/1.15/1.5/2/2.5/3)
  • setParagraphSpacing(before, after) — 단락 앞/뒤 margin-top/bottom (px)
  • getParagraphSpacing() — 현재 선택 단락의 {lineHeight, before, after} 반환

약점 #3: 각주/미주 (HIGH)

editor-core.js에 9개 메서드 추가:
  • insertFootnote() — 커서 위치에 파란색 <sup class="footnote-ref"> 마커 삽입 + 페이지 하단 .footnotes 영역 생성
  • insertEndnote() — 주황색 *N 미주 마커 삽입 + .endnotes 영역 생성
  • _getNextFootnoteNum() — 현재 각주 최대 번호 + 1
  • _ensureFootnotesArea() / _ensureEndnotesArea() — 각주/미주 div 없으면 생성
  • _renderFootnote() — 번호·텍스트 입력칸·삭제 버튼 행 렌더링
  • _renderFootnotes() — 전체 재렌더 (번호 재정렬)
  • _deleteFootnoteByNum() — 마커 + 항목 동시 삭제
  • CSS 동적 주입 — .footnote-ref, .footnotes, .endnotes, .footnote-item, .footnote-text 스타일

한선씨 동반 파일

  • /Users/ef/CrownyDoc/한선씨/편집기/각주미주.한선 생성

benchmark-weaknesses.json 업데이트

  • id=3 status: opendone
  • id=7 status: opendone

관련 파일 경로

  • /Users/ef/CrownyDoc/한선씨/정적/editor-core.js (468줄 → 969줄)
  • /Users/ef/CrownyDoc/한선씨/편집기/각주미주.한선 (신규)
  • /Users/ef/CrownyDoc/benchmark-weaknesses.json

잔여 이슈

  • 각주 내용을 getHTML()/내보내기에 포함하는 직렬화 로직 필요
  • 각주 마커 클릭 시 해당 각주 항목으로 스크롤 이동 연결 미구현
  • 단락 간격 UI 패널(드롭다운/슬라이더) 도구모음 연결 필요