Editor API
Initialisierung
interface EditorConfig {
// Configuration for the editor items
items: Array<Record<string, any>>;
// Automatically apply changes to the data object
autoSave?: boolean;
// Define the current active batch for the editor
activeBatch?: string;
// Configuration for the top toolbar
topBar?: {
// Array of items for the toolbar
items: Array<Record<string, any>>;
};
// Configuration for the bottom toolbar
bottomBar?: {
// Array of items for the toolbar
items: Array<Record<string, any>>;
};
// Additional CSS class for the editor's box
css?: string;
// Initial values for the editor fields
values?: Record<string, any>;
// Placement of the editor (inline, modal, sidebar)
placement?: "inline" | "modal" | "sidebar";
// Set the editor to readonly mode
readonly?: boolean;
// Define layout for the editor
layout?: "columns" | "default";
// Function to handle action events
onaction?: (ev: OnActionResult) => void;
// Function to handle change events
onchange?: (ev: OnChangeResult) => void;
// Function to handle save events
onsave?: (ev: OnSaveResult) => void;
// Function to handle validation events
onvalidation?: (ev: OnValidationResult) => void;
}
Properties
| activeBatch | Optional. Steuert, welcher Batch von Eingaben im Editor aktuell aktiv ist |
| autoSave | Optional. Steuert das automatische Speichern von Daten im Editor |
| bottomBar | Optional. Steuert die Konfiguration der unteren Symbolleiste im Editor |
| css | Optional. Definiert eine CSS-Klasse für das Editor-Feld |
| focus | Optional. Steuert, ob das Editor-Widget beim Rendern automatisch den Fokus erhalten soll |
| hotkeys | Optional. Ermöglicht die Angabe benutzerdefinierter Hotkeys für Editor-Aktionen |
| items | Optional. Definiert die Komponenten, die im Editor gerendert werden sollen |
| layout | Optional. Steuert das Layout der Editor-Komponenten |
| placement | Optional. Steuert die Platzierung der Editor-Komponenten |
| readonly | Optional. Steuert, ob sich der Editor im Nur-Lese-Modus befindet |
| topBar | Optional. Steuert die Konfiguration der oberen Symbolleiste im Editor |
| values | Optional. Definiert die Anfangswerte für die Editor-Felder |
Events
| action | Wird ausgelöst, wenn eine Änderung in einem beliebigen Feld des Editors erfolgt |
| change | Wird ausgelöst, wenn in einem beliebigen Feld des Editors eine Änderung auftritt |
| save | Wird ausgelöst, wenn ein Benutzer das Speichern von Daten im Editor anfordert |
| validation | Wird ausgelöst, wenn der Validierungsprozess abgeschlossen ist |
Helpers
registerEditorItem- externe Steuerelemente als Editor-Items registrieren
Verwandte Ressourcen
- Im Features-Leitfaden erfahren Sie mehr über die Funktionalität des Widgets.
- Erkunden Sie die Beispiele, um die verfügbaren Funktionen zu visualisieren.