🐛 fix: Add showLineNumbers prop handling in MonacoEditor for improved placeholder positioning

This commit is contained in:
web 2025-09-17 02:45:16 -07:00
parent a3c5e31094
commit bd67ece479
2 changed files with 7 additions and 1 deletions

View File

@ -96,6 +96,7 @@ export function TemplatePreview({ applicationId, output_format }: TemplatePrevie
title={t('title')}
value={getDisplayContent()}
language={mapLanguage(output_format)}
showLineNumbers
readOnly
/>
)}

View File

@ -168,7 +168,12 @@ export function MonacoEditor({
/>
{!internalValue?.trim() && placeholder && (
<pre
className='text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm'
className={cn(
'text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm',
{
'left-16': showLineNumbers,
},
)}
style={{ userSelect: 'none' }}
>
{placeholder}