라이브 블록 상단 이탈과 인용 해제 보정
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user