FieldImage class
Class for an image on a block.
Signature:
export declare class FieldImage extends Field<string>
Extends: Field<string>
Constructors
Constructor | Modifiers | Description |
|---|---|---|
(constructor)(src, width, height, alt, onClick, flipRtl, config) | Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| (not declared) | Editable fields usually show some sort of UI indicating they are editable. This field should not. | |
| SVGImageElement | null | The rendered field's image element. | |
| number | ||
| boolean | Used to tell if the field needs to be rendered the next time the block is rendered. Image fields are statically sized, and only need to be rendered at initialization. |
Methods
Method | Modifiers | Description |
|---|---|---|
| Configure the field based on the given map of options. | |
| Ensure that the input value (the source URL) is a string. | |
| Update the value of this image field, and update the displayed image. | |
Get whether to flip this image in RTL | ||
| Use the | |
Create the block UI for this image. | ||
Check whether this field should be clickable. | ||
Set the alt text of this image. | ||
Set the function that is called when this image is clicked. | ||
| If field click is called, and click handler defined, call the handler. | |