미디어 슬래시 명령 종류 계산 분리
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
} from '../../lib/markdown-editor-media.js'
|
||||
import {
|
||||
filterSlashCommands,
|
||||
getMediaPickerKindFromSlashAction,
|
||||
getSlashCommandFocusTarget,
|
||||
getSlashCommandTextareaSelection,
|
||||
insertMarkdownLinesAtSlashTarget,
|
||||
@@ -2670,10 +2671,16 @@ const applyLiveSlashCommand = (command) => {
|
||||
const line = liveSlashSourceLine.value
|
||||
|
||||
if (isMediaSlashAction(command.action)) {
|
||||
const mediaKind = getMediaPickerKindFromSlashAction(command.action)
|
||||
|
||||
if (!mediaKind) {
|
||||
return
|
||||
}
|
||||
|
||||
liveSlashInsertLine.value = line
|
||||
replaceLineRange(line, line, [], false)
|
||||
onLiveSlashEnd()
|
||||
openMediaPicker(command.action.replace('media-', ''))
|
||||
openMediaPicker(mediaKind)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user