From 584b87906b831512b4206089dee0f80b53dd19cb Mon Sep 17 00:00:00 2001 From: Nick Schirmer Date: Fri, 4 Oct 2024 12:00:38 -0500 Subject: [PATCH] feat(types): add configureEntryEditors definition (#1222) * feat(types): add configureEntryEditors definition * feat(types): add 'editor-builtin' to entry editor widget namespaces --- index.d.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 742d9348..847a0139 100644 --- a/index.d.ts +++ b/index.d.ts @@ -207,6 +207,12 @@ export interface IFieldGroupWidgetSettings { [setting: string]: WidgetSettingsValue } +export interface IEntryEditor { + widgetNamespace: 'editor-builtin' | 'builtin' | 'extension' | 'app', + widgetId: string, + settings?: IEditorInterfaceOptions +} + export interface ContentType { id: string instanceId: string @@ -245,11 +251,18 @@ export interface ContentType { * @param settings Widget settings */ configureEntryEditor( - widgetNamespace: 'builtin' | 'extension' | 'app', + widgetNamespace: 'editor-builtin' | 'builtin' | 'extension' | 'app', widgetId: string, settings?: IEditorInterfaceOptions ): void + /** + * Similar to configureEntryEditor, but allows configuring multiple entry editors at once. + * + * @param entryEditors An array of entry editor configurations. + */ + configureEntryEditors(entryEditors: IEntryEditor[]): void + /** * Changes the control of given field's ID. *