Class: block.block.AbstractBlock
An abstract block that must be used as a base class for custom blocks Defined in: block.js.
Field Summary
- block.block.AbstractBlock.$innerElement
- block.block.AbstractBlock.element
- block.block.AbstractBlock.id
- block.block.AbstractBlock.title
Class Methods
- activate
- attr
- createEditables
- deactivate
- destroy
- getId
- getSchema
- getTitle
- init
- isActive
- render
- renderToolbar
- serialize
Event Attributes | Event Name and Description |
---|---|
change()
|
Field Detail
jQuery block.block.AbstractBlock.$innerElementClass Method Detail
activates the block will select the block's contents, highlight it, update the floating menu and update the sidebar (if needed)
- Parameters:
- DOMNode clickedDomNode
- The DOM node which has been clicked. Should only be set INTERNALLY, if you call activate() programmatically, DO NOT SET THIS PARAM! We need the DOM node to see whether we clicked inside an embedded editable or not.
- Parameters:
- String|Object attributeNameOrObject
- String attributeValue
- Boolean Optional.
- If true, we do not fire change events.
Create editables from the inner content that was rendered for this block.
Override to use a custom implementation and to pass special configuration to .aloha()
- Parameters:
- jQuery innerElement
Destroy this block instance completely. Removes the element from the DOM, unregisters it, and triggers a delete event on the BlockManager.
- Returns:
- Returns:
- String
Get a schema of attributes with
TODO Document schema format
- Returns:
- Object
- Returns:
- Boolean True if this block is active
Template method to render contents of the block, must be implemented by specific block type
The renderer must manually take care of flushing the inner element if it needs that.
Render block toolbar elements
Template method to render custom block UI.