> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-udcodeeditor.md).

# New-UDCodeEditor

New-UDCodeEditor incorpora un editor di codice basato su Monaco in PowerShell Universal, con evidenziazione della sintassi, temi e supporto per il confronto delle differenze.

### Sintesi

Crea un nuovo controllo editor di codice Monaco.

### Sintassi

```powershell
New-UDCodeEditor [-Id <String>] [-Language <String>] [-Height <String>] [-Width <String>] [-HideCodeLens] [-DisableCodeFolding] [-FormatOnPaste] [-GlyphMargin] [-DisableLineNumbers] [-DisableLinks] [-DisableBracketMatching] [-MouseWheelScrollSensitivity <Int32>] [-MouseWheelZoom] [-ReadOnly] [-RenderControlCharacters] [-ShowFoldingControls <String>] [-SmoothScrolling] [-LightTheme <String>] [-DarkTheme <String>] [-Code <String>] [-Original <String>] [-CanSave] [-Extension <String>] [<CommonParameters>]

New-UDCodeEditor [-Id <String>] [-Language <String>] [-Height <String>] [-Width <String>] [-Code <String>] [-Original <String>] [-Options <Hashtable>] [-CanSave] [-Extension <String>] [<CommonParameters>]
```

### Descrizione

Crea un nuovo controllo editor di codice Monaco.

### Parametri

#### -Id

L'ID di questo editor

```
Required?                    false
Position?                    named
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Language

La lingua da usare per l'evidenziazione della sintassi.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Height

L'altezza dell'editor.

```
Required?                    false
Position?                    named
Default value                100ch
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Width

La larghezza dell'editor.

```
Required?                    false
Position?                    named
Default value                100%
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -HideCodeLens

Nasconde code lens all'interno dell'editor.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DisableCodeFolding

Disabilita il ripiegamento del codice.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -FormatOnPaste

Formatta all'incolla.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -GlyphMargin

Imposta la dimensione del margine dei glifi

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DisableLineNumbers

Disabilita i numeri di riga

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DisableLinks

Disabilita l'evidenziazione automatica dei collegamenti.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DisableBracketMatching

Disabilita la corrispondenza delle parentesi.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -MouseWheelScrollSensitivity

Imposta la sensibilità di scorrimento della rotellina del mouse.

```
Required?                    false
Position?                    named
Default value                1
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -MouseWheelZoom

Abilita lo zoom con Ctrl+Scroll.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ReadOnly

Imposta l'editor in sola lettura.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -RenderControlCharacters

Abilita il rendering dei caratteri di controllo.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ShowFoldingControls

Controlla come mostrare i controlli di ripiegamento.

```
Required?                    false
Position?                    named
Default value                mouseover
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -SmoothScrolling

Abilita lo scorrimento fluido.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -LightTheme

Il tema chiaro per l'editor.

```
Required?                    false
Position?                    named
Default value                vs
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DarkTheme

Il tema scuro per l'editor.

```
Required?                    false
Position?                    named
Default value                vs-dark
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Code

Il codice da mostrare nell'editor.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Original

Il codice originale con cui confrontare.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Options

Una hashtable di opzioni da applicare all'editor.

```
Required?                    false
Position?                    named
Default value                @{}
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -CanSave

Se il codice può essere salvato.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Extension

L'estensione del file.

```
Required?                    false
Position?                    named
Default value                txt
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Parametri comuni

Questo cmdlet supporta i parametri comuni: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable e OutVariable. Per maggiori informazioni, consulti [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

### Esempi

#### Esempio 1: editor di codice di base

```powershell
New-UDCodeEditor -Code 'Get-Process' -Theme 'vs-dark' -Language 'powershell' -Id 'codeEditor1'
```

Crea un editor di codice PowerShell

#### Esempio 2: editor di codice in sola lettura

```powershell
New-UDCodeEditor -Code 'Get-Process' -Theme 'vs-dark' -Language 'powershell' -Height '200' -Width '100%' -ReadOnly -Id 'codeEditor2'
```

Crea un editor di codice PowerShell in sola lettura

#### Esempio 3: editor di codice con diff

```powershell
New-UDCodeEditor -Code "Get-Process notepad" -Original "Get-Process code" -Theme 'vs-dark' -Language 'powershell' -Height '200' -Width '100%' -ReadOnly -Id 'codeEditor3'
```

Crea un editor di codice PowerShell in sola lettura con diff abilitato


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-udcodeeditor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
