라이브 블록 상단 이탈과 인용 해제 보정

This commit is contained in:
2026-06-05 11:03:42 +09:00
parent 56a2c23471
commit 6daf9ca15e
10 changed files with 63 additions and 22 deletions

View File

@@ -96,6 +96,7 @@ const emit = defineEmits([
'commit',
'input',
'split',
'insert-above',
'insert-below',
'delete-line',
'merge-with-previous',
@@ -174,16 +175,6 @@ watch(() => [props.modelValue, props.rawLine], () => {
return
}
const current = readEditorValue()
if (current !== props.modelValue) {
if (props.plainText) {
rootRef.value.innerHTML = plainTextToEditorHtml(props.modelValue)
} else {
rootRef.value.innerHTML = toEditorHtml()
}
}
})
onMounted(() => {
@@ -542,10 +533,13 @@ const navigateToAdjacentBlock = (direction, column, caretMode = 'column') => {
const target = elements[currentIndex + direction]
if (!target) {
if (
direction === 1
&& props.arrowExitCreatesLine
) {
if (!props.arrowExitCreatesLine) {
return
}
if (direction === -1) {
emit('insert-above', buildInsertBelowPayload())
} else {
emit('insert-below', buildInsertBelowPayload())
}