Blocks

get #

Returns all blocks in the content.


let $blocks = this.app.blocks.get();
$blocks.each(function($node) {
    let instance = $node.dataget('instance');
});

Returns all selected blocks.


let $blocks = this.app.blocks.get({ selected: true });
$blocks.each(function($node) {
    let instance = $node.dataget('instance');
});

Returns instances of all selected blocks.


let blocks = this.app.blocks.get({ selected: true, instances: true });

Returns the first block in the content.


let $block = this.app.blocks.get({ first: true });

Returns the last block in the content.


let $block = this.app.blocks.get({ last: true });