관리자 미디어 페이지네이션과 라이브 렌더링 개선

This commit is contained in:
2026-07-02 15:15:33 +09:00
parent 7c9b5e9278
commit 3dd30d7f76
12 changed files with 242 additions and 25 deletions

View File

@@ -2,6 +2,7 @@
import {
getEditableCaretOffset,
markdownInlineToHtml,
markdownMultilineInlineToHtml,
readEditableTextFromElement,
setEditableCaretOffset
} from '../../lib/markdown-inline.js'
@@ -160,6 +161,12 @@ const resolvedEnterMode = computed(() => {
*/
const toEditorHtml = () => markdownInlineToHtml(props.modelValue.replace(/\n/g, ' '))
/**
* modelValue를 멀티라인 편집용 HTML로 변환한다.
* @returns {string} HTML
*/
const toMultilineEditorHtml = () => markdownMultilineInlineToHtml(props.modelValue)
/**
* plainText 모드용 편집 텍스트를 만든다.
* @param {string} value - 본문
@@ -189,7 +196,9 @@ const syncEditorHtml = (options = {}) => {
return
}
rootRef.value.innerHTML = toEditorHtml()
rootRef.value.innerHTML = resolvedEnterMode.value === 'multiline'
? toMultilineEditorHtml()
: toEditorHtml()
}
onMounted(() => {