To display your own external data list in a pop-up window that users can choose to dynamically retrieve data from for their smart modules, you can set the "externalSmartElementsLibrary" parameter when you initialize the Plugin:

window.Stripo.init({
...,
externalSmartElementsLibrary: {
openLibrary(onDataSelectCallback, onCancelCallback, selectedModule) {
/* Put your logic here.
Call
onDataSelectCallback({
key: value
})
when the user selects the data from the external library.
Call
onCancelCallback()
when user close the library without image selection.

selectedModule could include data such as tags or variables
attached to the module
*/
}
}

Please find a code example here to see how it works in general.

If you want to provide an option to choose whether use an external data list or a website data list, you can set up an additional parameter "enableWebSiteLinksForSmartElementsLibrary" when you initialize the Plugin:


window.Stripo.init({
...,
externalSmartElementsLibrary: {
openLibrary(onDataSelectCallback, onCancelCallback, selectedModule) {
/* Put your logic here.
Call
onDataSelectCallback({
key: value
})
when the user selects the data from the external library.
Call
onCancelCallback()
when user close the library without image selection.

selectedModule could include data such as tags or variables
attached to the module
*/
}, enableWebSiteLinksForSmartElementsLibrary : true,
}

As a result, your customers can add their own data from the site or external sources.


Thank you for taking the time to read our articles. We hope you will find this information helpful.

If you have any additional questions, please email us at support@stripo.email.

We would be glad to talk with you.



Did this answer your question?