Documentation
Card
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:
hasImage #
Checks if the card has an image.
var instance = this.app.block.get();
var has = instance.hasImage();
getImage #
Returns the card image DOM element.
var instance = this.app.block.get();
var $img = instance.getImage();
getAlt #
Returns the card image alternative text.
var instance = this.app.block.get();
var alt = instance.getAlt();
setAlt #
Sets alternative text to the card image.
var instance = this.app.block.get();
instance.setAlt('alt-text');
setImage #
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);