-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Background / current behavior
The BM component UI is rendered through an iframe on a separate domain.
In Page Designer we can embed Cloudinary editors inside existing components (e.g., Banner) using a custom editor definition like:
{
"id": "asset_sel",
"name": "Component configuration",
"type": "custom",
"required": false,
"editor_definition": {
"type": "cloudinary.videoForm"
}
}This works, but the editor always renders the same set of configuration options
Problem
Some Page Designer components don’t need (or shouldn’t expose) certain options.
Example:
We integrate Cloudinary into the Banner component to pick/set a background image.
Showing “Advanced” options (and especially things like hyperlink/reference fields for a background image) doesn’t make sense in that context.
Same idea for videos embedded into components that don’t support certain behaviors , for example video controls either is always default or controlled by standalone editor.
Requested proposal
Allow the Page Designer to pass the iframe URL and/or a configuration object into the custom editor so the iframe can conditionally render parts of the UI (e.g., hide “Advanced”, hide “Player Options”, etc.). Without the ability to conditionally tailor the editor, the final Page Designer component becomes cumbersome to configure
For example, support something like:
{
"id": "asset_sel",
"name": "Component configuration",
"type": "custom",
"required": false,
"editor_definition": {
"type": "cloudinary.videoForm",
"configuration": {
"options": {
"showAdvanced": false,
"showPlayerOptions": false
}
}
}
}