Type: card
Editable: true
Tags: div
If a div
tag has a card
class, which is specified in the card.classname
setting, then such a layer becomes a card
block.
<div class="card">...</div>
Check out the card settings for more details and examples of cards for different frameworks:
Checks if the card has an image.
var instance = this.app.block.get();
var has = instance.hasImage();
Returns the card image DOM element.
var instance = this.app.block.get();
var $img = instance.getImage();
Returns the card image alternative text.
var instance = this.app.block.get();
var alt = instance.getAlt();
Sets alternative text to the card image.
var instance = this.app.block.get();
instance.setAlt('alt-text');
Sets src and optional ID to the card image.
var data = {
url: 'image-url.jpg',
id: 'image-id' // optional
};
var instance = this.app.block.get();
instance.setImage(data);