관리자 미디어 페이지네이션과 라이브 렌더링 개선
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -3193,7 +3193,6 @@ onBeforeUnmount(() => {
|
||||
block-class="content-markdown-renderer__quote-line"
|
||||
:model-value="block.text"
|
||||
enter-mode="multiline"
|
||||
plain-text
|
||||
arrow-exit-creates-line
|
||||
preserve-empty-line-on-full-delete
|
||||
empty-markdown-line="> "
|
||||
|
||||
@@ -110,7 +110,7 @@ const onExitBelow = (payload) => {
|
||||
class="content-markdown-toggle-editor"
|
||||
data-editable-scope
|
||||
:title="titleDraft"
|
||||
:default-open="true"
|
||||
:default-open="defaultOpen"
|
||||
animated
|
||||
>
|
||||
<template #title>
|
||||
|
||||
Reference in New Issue
Block a user