라이브 편집 선택·콜아웃·인용 안정화 및 오른쪽 사이드바 여백 보정 (v1.5.70)

Selection Bridge로 블록 간 선택·삭제를 보강하고, 콜아웃·인용 멀티라인 Enter·전체 선택 삭제·한글 IME 문제를 수정했다. Obsidian식 위첨자 문법과 RightSidebar 패딩·커스텀 아이콘 색상도 함께 반영한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-05 15:27:06 +09:00
parent 4c0875446b
commit 928b8446b4
13 changed files with 1458 additions and 117 deletions

View File

@@ -1804,6 +1804,19 @@ const onPreviewBlockContentChange = ({ startLine, endLine, replacementLines }) =
replaceLineRange(startLine, resolveCurrentFencedBlockEndLine(startLine, endLine), replacementLines, false)
}
/**
* 라이브 모드 교차 선택 삭제 결과를 본문에 반영한다.
* @param {{ value: string }} payload - 갱신된 마크다운
* @returns {void}
*/
const onPreviewContentReplace = ({ value }) => {
if (typeof value !== 'string') {
return
}
markdownValue.value = value
}
/**
* 라이브 모드 하단에서 새 문단 줄을 추가한다.
* @returns {void}
@@ -1862,6 +1875,23 @@ const onPreviewDeleteLine = (lineIndex) => {
* @returns {void}
*/
const handlePreviewKeydownCapture = (event) => {
const target = event.target
const isSelectAllShortcut = (event.metaKey || event.ctrlKey)
&& !event.shiftKey
&& !event.altKey
&& event.key.toLowerCase() === 'a'
if (isSelectAllShortcut) {
if (target instanceof HTMLElement && target.closest('[contenteditable="true"]')) {
return
}
event.preventDefault()
event.stopPropagation()
previewRendererRef.value?.selectAllLiveDocument()
return
}
const isDeleteShortcut = (event.metaKey || event.ctrlKey)
&& event.shiftKey
&& event.key.toLowerCase() === 'k'
@@ -1870,8 +1900,6 @@ const handlePreviewKeydownCapture = (event) => {
return
}
const target = event.target
if (target instanceof HTMLElement && target.closest('[contenteditable="true"]')) {
return
}
@@ -3093,6 +3121,7 @@ const handleKeydown = (event) => {
@extract-gallery-image="onPreviewExtractGalleryImage"
@remove-gallery-image="onPreviewRemoveGalleryImage"
@block-content-change="onPreviewBlockContentChange"
@content-replace="onPreviewContentReplace"
@append-paragraph="onPreviewAppendParagraph"
@insert-after-line="onPreviewInsertAfterLine"
@delete-line="onPreviewDeleteLine"