Skip to content

Commit

Permalink
Update block docs
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Aug 14, 2021
1 parent 776815a commit 506ea6c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/block_manager/model/Block.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import { Model } from 'common';

/**
* @property {String} [label=''] Block label, eg. `My block`
* @property {Boolean} [activate=false] If true, triggers an the 'active' event on dropped component
* @property {String} label Block label, eg. `My block`
* @property {String|Object} content The content of the block. Might be an HTML string or a [Component Defintion](/modules/Components.html#component-definition)
* @property {String} [media=''] HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc.
* @property {String} [category=''] Block category
* @property {Boolean} [activate=false] If true, triggers an the `active` event on dropped component
* @property {Boolean} [select=false] If true, the dropped component will be selected
* @property {Boolean} [resetId=false] If true, all IDs of dropped components and their styles will be changed
* @property {Boolean} [disable=false] Disable the drag of the block
* @property {String} [media=''] HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc.
* (**WARNING:** In order to support HTML strings, this property is not escaped)
* @property {String|Object} content The content of the block. Might be an HTML string or a [Component Defintion](/modules/Components.html#component-definition)
* @property {String} [category=''] Block category
* @property {Object} [attributes={}] Block attributes to apply in the view element
*/
export default class Block extends Model {
defaults() {
return {
label: '',
content: '',
media: '',
category: '',
activate: false,
select: false,
resetId: false,
disable: false,
media: '',
content: '',
category: '',
attributes: {}
};
}
Expand Down

0 comments on commit 506ea6c

Please sign in to comment.