Skip to content

Commit

Permalink
feat(types): add configureEntryEditors definition (#1222)
Browse files Browse the repository at this point in the history
* feat(types): add configureEntryEditors definition

* feat(types): add 'editor-builtin' to entry editor widget namespaces
  • Loading branch information
nschirmer authored Oct 4, 2024
1 parent bbd3eb6 commit 584b879
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 584b879

Please sign in to comment.