diff --git a/frontend/src/components/script-editor/ScriptBodyEditor.tsx b/frontend/src/components/script-editor/ScriptBodyEditor.tsx index a61d41ff..e16246d8 100644 --- a/frontend/src/components/script-editor/ScriptBodyEditor.tsx +++ b/frontend/src/components/script-editor/ScriptBodyEditor.tsx @@ -37,7 +37,7 @@ export function ScriptBodyEditor({ value, onChange, disabled }: Props) {
{/* Highlighted overlay (read-only visual layer) — scroll synced to textarea */}
- +
{/* Editable textarea (transparent text, visible caret) */} @@ -49,7 +49,7 @@ export function ScriptBodyEditor({ value, onChange, disabled }: Props) { onKeyDown={handleTab} disabled={disabled} spellCheck={false} - className="relative z-10 w-full min-h-[300px] resize-y font-label text-sm bg-transparent text-transparent caret-foreground p-4 focus:outline-none focus:ring-1 focus:ring-[rgba(6,182,212,0.2)] disabled:cursor-not-allowed disabled:opacity-50" + className="relative z-10 w-full min-h-[300px] resize-y font-label text-sm leading-[1.5] bg-transparent text-transparent caret-foreground p-4 whitespace-pre-wrap break-words focus:outline-none focus:ring-1 focus:ring-[rgba(6,182,212,0.2)] disabled:cursor-not-allowed disabled:opacity-50" placeholder="# Enter your PowerShell script here… # Use {{ param_name }} for parameter placeholders" />
diff --git a/frontend/src/components/scripts/PowerShellHighlighter.tsx b/frontend/src/components/scripts/PowerShellHighlighter.tsx index a27ad551..cfa80677 100644 --- a/frontend/src/components/scripts/PowerShellHighlighter.tsx +++ b/frontend/src/components/scripts/PowerShellHighlighter.tsx @@ -62,9 +62,10 @@ function classify(token: string): string { interface Props { script: string + className?: string } -export function PowerShellHighlighter({ script }: Props) { +export function PowerShellHighlighter({ script, className }: Props) { const parts: React.ReactNode[] = [] let lastIndex = 0 @@ -90,7 +91,7 @@ export function PowerShellHighlighter({ script }: Props) { } return ( -
+    
       {parts}
     
)