Documentation
Blocks
getBlocks
Returns all blocks in the content.
var $blocks = this.app.blocks.getBlocks();
$blocks.each(function($node) {
var instance = $node.dataget('instance');
});
getFirstLevel
Returns first-level blocks in the content.
var $blocks = this.app.blocks.getFirstLevel();
$blocks.each(function($node) {
var instance = $node.dataget('instance');
});
getEditableBlocks
Returns all editable blocks in the content.
var $blocks = this.app.blocks.getEditableBlocks();
$blocks.each(function($node) {
var instance = $node.dataget('instance');
});
getSelected
Returns all selected blocks.
var $blocks = this.app.blocks.getSelected();
$blocks.each(function($node) {
var instance = $node.dataget('instance');
});
getFirst
Returns the first block in the content.
var instance = this.app.blocks.getFirst();
getFirstSelected
Returns the first selected block.
var instance = this.app.blocks.getFirstSelected();
getLast
Returns the last block in the content.
var instance = this.app.blocks.getLast();
getLastSelected
Returns the last selected block.
var instance = this.app.blocks.getLastSelected();
removeSelected
Removes selected blocks.
this.app.blocks.removeSelected();
unset
Unsets selected blocks.
this.app.blocks.unset();
dkjgvo65776inru43654