260907_01_ENH: 에디터 이미지맵 보존 및 SMS 미리보기 문구 지원

This commit is contained in:
2026-09-07 14:28:31 +09:00
parent b36893610f
commit b6ed23fa88
9 changed files with 416 additions and 17 deletions

View File

@@ -16,7 +16,6 @@ import {
useTemplateQuery,
} from '@/query/message'
import { ChannelType, TemplateSms } from '@kri/common/noti-hub'
import { sanitizeHtmlForPreview } from '@/components/kri-editor/utils/sanitizeHtml'
import { cn } from '@/lib/utils'
import { getNearestFutureDateTime } from '@/lib/datetime'
import type { DialogId } from '@/store/jotai/dialog'
@@ -25,7 +24,8 @@ import { ListHeaderConst } from '@/const/listConst'
import type { ListTableRow } from '@/components/table-column/ListTableColumn'
import ApplyFilterOption, { validateApplyFilterTarget } from './ListDialogOption/ApplyFilterOption'
import { KriEditor } from '@/components/kri-editor'
import { normalizeQrCodeForEditor, QR_CODE_ALLOWED_HTML, renderQrCodePreviewHtml } from '@/components/message-template/qrcode'
import { normalizeQrCodeForEditor, renderQrCodePreviewHtml } from '@/components/message-template/qrcode'
import { sanitizeEmailHtml } from '@/components/message-template/emailHtmlPolicy'
import { applyLinkPreviewClass } from '@/components/kri-editor/utils/linkPreview'
import TemplateAttachmentList from '@/components/message-template/TemplateAttachmentList'
import type { TemplateEmailWithAttachments, TemplateSummaryWithPurpose } from '@/types/message'
@@ -351,9 +351,8 @@ const MessageSendDialog = ({
dangerouslySetInnerHTML={{
__html: renderQrCodePreviewHtml(
applyLinkPreviewClass(
sanitizeHtmlForPreview(
sanitizeEmailHtml(
normalizeQrCodeForEditor(selectedTemplate.tmplatBody) || '(내용 없음)',
QR_CODE_ALLOWED_HTML,
),
),
),

View File

@@ -15,8 +15,8 @@ import {
useTemplateQuery,
} from '@/query/message'
import { ChannelType, type TemplateSms, type TemplateSummary } from '@kri/common/noti-hub'
import { sanitizeHtmlForPreview } from '@/components/kri-editor/utils/sanitizeHtml'
import { KriEditor } from '@/components/kri-editor'
import { sanitizeEmailHtml } from '@/components/message-template/emailHtmlPolicy'
import { getNearestFutureDateTime } from '@/lib/datetime'
import { escapeHtml, substituteVariables } from '@/lib/variableSubstitution'
import type { DialogId } from '@/store/jotai/dialog'
@@ -255,7 +255,7 @@ const SingleMessageSendDialog = ({
<div
className="rounded-md border bg-muted/30 p-3 text-sm"
dangerouslySetInnerHTML={{
__html: sanitizeHtmlForPreview(
__html: sanitizeEmailHtml(
substituteVariables(
selectedTemplate.tmplatBody || '(내용 없음)',
Object.fromEntries(Object.entries(previewValues).map(([key, val]) => [key, escapeHtml(val)])),