Documentation
Block
block.set #
Occurs whenever a block selected.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.set': function() {
...
}
}
});
block.unset #
Occurs whenever a block unselected.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.unset': function() {
...
}
}
});
block.add #
instance | Object | Instance of the added block. |
type | String | Block adding type 'add' or 'input' 'add' — if the block is added via addbar 'input' — if a block is added by pressing the keys |
Occurs whenever a block added into the content.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.add': function(event) {
...
}
}
});
block.change #
instance | Object | Instance of the changed block. |
Occurs whenever a block changed. At the moment works only when the embed or code content is changed.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.change': function(event) {
...
}
}
});
block.format #
instance | Object | Instance of the formatted block. |
Occurs whenever a block formatted.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.format': function(event) {
...
}
}
});
block.remove #
type | String | Type of the removed block. |
parent | Object | Parent instance of the removed block. |
Occurs whenever a block removed.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.remove': function(event) {
...
}
}
});
block.duplicate #
instance | Object | Instance of the new block. |
Occurs whenever a block duplicated.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
subscribe: {
'block.duplicate': function(event) {
...
}
}
});