Zum Hauptinhalt springen

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

activeBatchOptional. Steuert, welcher Batch von Eingaben im Editor aktuell aktiv ist
autoSaveOptional. Steuert das automatische Speichern von Daten im Editor
bottomBarOptional. Steuert die Konfiguration der unteren Symbolleiste im Editor
cssOptional. Definiert eine CSS-Klasse für das Editor-Feld
focusOptional. Steuert, ob das Editor-Widget beim Rendern automatisch den Fokus erhalten soll
hotkeysOptional. Ermöglicht die Angabe benutzerdefinierter Hotkeys für Editor-Aktionen
itemsOptional. Definiert die Komponenten, die im Editor gerendert werden sollen
layoutOptional. Steuert das Layout der Editor-Komponenten
placementOptional. Steuert die Platzierung der Editor-Komponenten
readonlyOptional. Steuert, ob sich der Editor im Nur-Lese-Modus befindet
topBarOptional. Steuert die Konfiguration der oberen Symbolleiste im Editor
valuesOptional. Definiert die Anfangswerte für die Editor-Felder

Events

actionWird ausgelöst, wenn eine Änderung in einem beliebigen Feld des Editors erfolgt
changeWird ausgelöst, wenn in einem beliebigen Feld des Editors eine Änderung auftritt
saveWird ausgelöst, wenn ein Benutzer das Speichern von Daten im Editor anfordert
validationWird ausgelöst, wenn der Validierungsprozess abgeschlossen ist

Helpers


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.