Created
March 26, 2024 14:40
-
-
Save sitefinitySDK/58a7a3a47090e14ee4842ea43793986c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WidgetRegistry, initRegistry, defaultWidgetRegistry } from '@progress/sitefinity-nextjs-sdk'; | |
import { HelloWorld } from './components/hello-world/hello-world'; | |
import { HelloWorldEntity } from './components/hello-world/hello-world.entity'; | |
const customWidgetRegistry: WidgetRegistry = { | |
widgets: { | |
'HelloWorld': { | |
componentType: HelloWorld, // registration of the widget | |
entity: HelloWorldEntity, // registration of the designer | |
editorMetadata: {...} // metadata to be displayed in the WYSIWYG editor - title, available operation, empty content visuals etc. | |
ssr: true // whether this is a server rendered or client rendered component | |
} | |
} | |
}; | |
customWidgetRegistry.widgets = { | |
...defaultWidgetRegistry.widgets, | |
...customWidgetRegistry.widgets | |
}; | |
export const widgetRegistry: WidgetRegistry = initRegistry(customWidgetRegistry); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment