260810_03_ENH: 에디터 버전 맞춤, ssr에 대한 조치
This commit is contained in:
@@ -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)}>
|
||||
|
||||
Reference in New Issue
Block a user