> 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/de/powershell-befehle/new-udcodeeditor.md).

# New-UDCodeEditor

New-UDCodeEditor bettet einen Monaco-basierten Code-Editor in PowerShell Universal ein, mit Syntaxhervorhebung, Themes und Unterstützung für Diff-Vergleiche.

### Übersicht

Erstellt ein neues Monaco-Code-Editor-Steuerelement.

### Syntax

```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>]
```

### Beschreibung

Erstellt ein neues Monaco-Code-Editor-Steuerelement.

### Parameter

#### -Id

Die ID dieses Editors

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

#### -Language

Die Sprache, die für die Syntaxhervorhebung verwendet werden soll.

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

#### -Height

Die Höhe des Editors.

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

#### -Width

Die Breite des Editors.

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

#### -HideCodeLens

Blendet Code Lens innerhalb des Editors aus.

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

#### -DisableCodeFolding

Deaktiviert die Codefaltung.

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

#### -FormatOnPaste

Formatiert beim Einfügen.

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

#### -GlyphMargin

Legt die Größe des Glyphenrands fest

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

#### -DisableLineNumbers

Deaktiviert Zeilennummern

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

#### -DisableLinks

Deaktiviert das automatische Hervorheben von Links.

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

#### -DisableBracketMatching

Deaktiviert die Klammerzuordnung.

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

#### -MouseWheelScrollSensitivity

Legt die Scroll-Empfindlichkeit des Mausrads fest.

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

#### -MouseWheelZoom

Aktiviert das Zoomen mit Strg+Scrollen.

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

#### -ReadOnly

Setzt den Editor auf schreibgeschützt.

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

#### -RenderControlCharacters

Aktiviert das Rendern von Steuerzeichen.

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

#### -ShowFoldingControls

Steuert, wie die Faltungssteuerelemente angezeigt werden.

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

#### -SmoothScrolling

Aktiviert weiches Scrollen.

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

#### -LightTheme

Das helle Theme für den Editor.

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

#### -DarkTheme

Das dunkle Theme für den Editor.

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

#### -Code

Der Code, der im Editor angezeigt werden soll.

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

#### -Original

Der Originalcode, mit dem verglichen werden soll.

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

#### -Options

Eine Hashtabelle mit Optionen, die auf den Editor angewendet werden sollen.

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

#### -CanSave

Ob der Code gespeichert werden kann.

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

#### -Extension

Die Erweiterung der Datei.

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

#### Allgemeine Parameter

Dieses Cmdlet unterstützt die allgemeinen Parameter: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable und OutVariable. Weitere Informationen finden Sie unter [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Ausgaben

### Beispiele

#### Beispiel 1: Einfacher Code-Editor

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

Erstellt einen PowerShell-Code-Editor

#### Beispiel 2: Schreibgeschützter Code-Editor

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

Erstellt einen schreibgeschützten PowerShell-Code-Editor

#### Beispiel 3: Diff-Code-Editor

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

Erstellt einen schreibgeschützten PowerShell-Code-Editor mit aktiviertem Diff


---

# 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/de/powershell-befehle/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.
