라이브 편집 패널과 이미지 명령 정리
This commit is contained in:
@@ -510,7 +510,7 @@ const handleLiveLineFocus = async (sourceLine) => {
|
||||
*/
|
||||
const handleLiveLineBlur = () => {
|
||||
blockPanelFocusTimer = window.setTimeout(() => {
|
||||
if (isMediaPickerOpen.value || isFocusInBlockPanel() || isFocusInMediaPicker()) {
|
||||
if (isMediaPickerOpen.value || isBlockPanelEngaged.value || isFocusInBlockPanel() || isFocusInMediaPicker()) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2340,6 +2340,12 @@ const onPreviewBlockContentChange = ({ startLine, endLine, replacementLines }) =
|
||||
return
|
||||
}
|
||||
|
||||
if (liveSlashInsertLine.value === startLine
|
||||
&& replacementLines.length === 1
|
||||
&& parseSlashInput(replacementLines[0])) {
|
||||
return
|
||||
}
|
||||
|
||||
replaceLineRange(startLine, resolveCurrentFencedBlockEndLine(startLine, endLine), replacementLines, false)
|
||||
}
|
||||
|
||||
@@ -2838,11 +2844,12 @@ const onLiveSlashApply = (payload) => {
|
||||
*/
|
||||
const insertMarkdownAtLine = (lineIndex, insertLines) => {
|
||||
const sourceLines = (markdownValue.value ?? '').split('\n')
|
||||
const replaceCount = parseSlashInput(sourceLines[lineIndex] ?? '') ? 1 : 0
|
||||
|
||||
markdownValue.value = [
|
||||
...sourceLines.slice(0, lineIndex),
|
||||
...insertLines,
|
||||
...sourceLines.slice(lineIndex)
|
||||
...sourceLines.slice(lineIndex + replaceCount)
|
||||
].join('\n')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user