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

Event Summary
Event Attributes Event Name and Description

Field Detail

jQuery block.block.AbstractBlock.$innerElement
The inner element which is containing the actual user-provided content
jQuery block.block.AbstractBlock.element
The wrapper element around the inner element
String block.block.AbstractBlock.id
Id of the assigned element, used to identify a block
String block.block.AbstractBlock.title
Title for the block, used to display the name in the sidebar.

Class Method Detail

activate

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.
attr
Get or set one or many attributes
Parameters:
String|Object attributeNameOrObject
String attributeValue
Boolean Optional.
If true, we do not fire change events.
createEditables

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
deactivate
Deactive the block
destroy

Destroy this block instance completely. Removes the element from the DOM, unregisters it, and triggers a delete event on the BlockManager.

Returns:
getId
Get the id of the block
Returns:
String
getSchema

Get a schema of attributes with

TODO Document schema format

Returns:
Object
getTitle
Template Method which should return the block title
init
Template method to initialize the block
isActive
Returns:
Boolean True if this block is active
render

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.

renderToolbar

Render block toolbar elements

Template method to render custom block UI.

serialize
Event Detail
change()
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 30 2011 13:33:45 GMT+0100 (CET)