🐛 fix: Update TemplatePreview to use MonacoEditor for content display and improve error handling

This commit is contained in:
web
2025-09-14 22:54:50 -07:00
parent 131693b604
commit 1d52642cb7
2 changed files with 36 additions and 22 deletions
@@ -112,9 +112,9 @@ export function MonacoEditor({
</div>
</div>
<div className={cn('relative flex flex-1 overflow-hidden')}>
<div className={cn('relative flex flex-1')}>
<div
className={cn('flex-1 overflow-hidden p-4 invert dark:invert-0', {
className={cn('flex-1 overflow-auto p-4 invert dark:invert-0', {
'w-1/2': isPreviewVisible,
})}
>
@@ -142,10 +142,11 @@ export function MonacoEditor({
scrollBeyondLastLine: false,
scrollbar: {
useShadows: false,
vertical: 'hidden',
vertical: 'auto',
},
tabSize: 2,
wordWrap: 'off',
readOnly: !onChange,
}}
theme='transparentTheme'
beforeMount={(monaco: Monaco) => {