> 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/apps/components/inputs/editor.md).

# Editor

Die Editor-Komponente basiert auf [Editor.js](https://editorjs.io/). Es handelt sich um einen Blockeditor, der Text, Links, Listen, Code und Bilder akzeptiert.

Bei der Arbeit mit dem Editor können Sie über den Parameter `OnChange` Daten über das aktuelle Dokument erhalten. Standardmäßig werden die Daten im [JSON-Format](https://editorjs.io/saving-data) von Editor.js zurückgegeben.

## Einen Editor erstellen

Um einen einfachen Editor zu erstellen, verwenden Sie das Cmdlet `New-UDEditor`.

```
New-UDEditor
```

Der Editor ist verfügbar und Sie können neue Blöcke hinzufügen, indem Sie auf die Plus-Schaltfläche klicken.

![](/files/H6sRLqaIQLCYckcwQ3XX)

## Arbeiten mit Daten

Wenn Sie einen Skriptblock für den Ereignishandler `-OnChange` definieren, enthält die Variable `$EventData` den aktuellen Status des Editors. Standardmäßig wird dabei das [JSON-Blockformat](https://editorjs.io/saving-data) von Editor.JS zurückgegeben.

```
New-UDEditor -OnChange {
    Show-UDToast $EventData
}
```

Sie können auch das HTML-Render-Plugin verwenden, indem Sie den Parameter `-Format` angeben.

```
New-UDEditor -OnChange {
    Show-UDToast $EventData
} -Format 'html'
```

Um die Standarddaten für den Editor anzugeben, verwenden Sie den Parameter `-Data`. Sie müssen das JSON-Blockformat angeben.

```
New-UDEditor -Data $Data
```

## Bildunterstützung

Um Bilder zu unterstützen, müssen Sie einen [veröffentlichten Ordner](/powershell-universal/de/plattform/published-folders.md) angeben, in den die Bilder hochgeladen werden. Sobald ein veröffentlichter Ordner definiert ist, können Bilder direkt im Editor hochgeladen werden. Sie werden in diesem Verzeichnis platziert und dann über den Anforderungspfad bereitgestellt.

```powershell
New-UDEditor -PublishedFolder 'MyImages'
```

## API

### New-UDEditor

<table><thead><tr><th>Name</th><th>Typ</th><th>Beschreibung</th><th data-type="checkbox">Erforderlich</th></tr></thead><tbody><tr><td>Id</td><td>string</td><td>Die ID dieser Komponente.</td><td>false</td></tr><tr><td>Data</td><td>Hashtable</td><td>Die Editor.JS-Daten für diese Komponente</td><td>false</td></tr><tr><td>OnChange</td><td>ScriptBlock</td><td>Der Skriptblock-Ereignishandler, der aufgerufen wird, wenn sich die Editor-Daten ändern.</td><td>false</td></tr><tr><td>Format</td><td>string</td><td>Ob im OnChange-Skriptblock json oder html zurückgegeben wird.</td><td>false</td></tr></tbody></table>


---

# 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/apps/components/inputs/editor.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.
