Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.9 KiB

Block

Properties

  • label String Block label, eg. My block
  • content (String | Object) The content of the block. Might be an HTML string or a Component Defintion
  • media String? HTML string for the media/icon of the block, eg. <svg ..., <img ..., etc.
  • category String? Block category, eg. Basic blocks
  • activate Boolean? If true, triggers the active event on the dropped component.
  • select Boolean? If true, the dropped component will be selected.
  • resetId Boolean? If true, all IDs of dropped components and their styles will be changed.
  • disable Boolean? Disable the block from being interacted
  • onClick Function? Custom behavior on click, eg. (block, editor) => editor.getWrapper().append(block.get('content'))
  • attributes Object? Block attributes to apply in the view element

getId

Get block id

Returns String

getLabel

Get block label

Returns String

getMedia

Get block media

Returns String

getContent

Get block content

Returns (Object | String | Array<(Object | String)>)

getCategoryLabel

Get block category label

Returns String