260810_03_ENH: 에디터 버전 맞춤, ssr에 대한 조치

This commit is contained in:
2026-08-10 09:52:17 +09:00
parent 0feda2a324
commit f34f073d1e
4 changed files with 27 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import { resolveUploadUrl } from './types'
import { compressImage } from './utils/imageCompression'
import { useDebouncedChange } from './hooks/useDebouncedChange'
import { sanitizeHtmlForPreview } from './utils/sanitizeHtml'
import { preserveEmptyParagraphs } from './utils/emptyParagraph'
import { useTextareaInsert } from './hooks/useTextareaInsert'
type HtmlOnlyProps = Omit<KriEditorProps, 'mode'> & { mode: 'html' }
@@ -121,7 +122,10 @@ export function KriEditorHtmlOnly({
}
}
const previewHtml = React.useMemo(() => sanitizeHtmlForPreview(html), [html])
const previewHtml = React.useMemo(
() => sanitizeHtmlForPreview(preserveEmptyParagraphs(html)),
[html],
)
return (
<div className={cn('rounded-md border bg-background', className)}>