You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mauricio Gelves edited this page Feb 7, 2022
·
10 revisions
The Image Control is intended for use within the editor sidebar, for example a block sidebar or a plugin sidebar.
This control allows users to select an image, remove a selected image or change a selected image. A small preview of the image is also shown. It is styled appropriately for use in the sidebar, alongside other core controls such as wp.components.TextControl.
Example usage:
const{ ImageControl }=window.hm.controls;<ImageControllabel={'Image'}help={'Some more description text'}value={attributes.image.id}onChange={image=>setAttributes(image)}/>