-
Notifications
You must be signed in to change notification settings - Fork 535
Aloha blocks glossary
Jotschi edited this page Nov 10, 2011
·
3 revisions
Here, the most important terms related to block handling are defined.
Main Defininition:
- are non-editable elements on a website, which have some attributes being manipulated by the end user through the Aloha interface.
- can occur inside Editables, but also outside Editables
- can contain nested Editables
- are rendered by a Block Renderer
- content of the block unknown to the Block Plugin or Aloha Core
- A block has Properties as key-value pairs
- not possible to nest blocks directly inside blocks
- Aloha Plugin which implements the Block functionality
- Object responsible for rendering a block.
- Follows Command Design Pattern
- is implemented by the user
- Example: calls backend service via AJAX
- are simple key-value pairs
- stores in the DOM as HTML5 Data attributes (there seems to be no limitation on HTML attribute length http://stackoverflow.com/questions/1496096/is-there-a-limit-to-the-length-of-html-attributes)
- are the Parameters for the Block Renderer
{ name: Haymo Phone: 12345 }internally serialized as
<div data-name="Haymo" data-phone="12345" />
Storing a internal ID for/from a backend service
{ about: 323345 }internally serialized as
<div about="323345" />
Edge case: having an inline HTML template
{ template: <p class="tip {tip-type}">{tip-content}</p> tip-type: warning tip-content: You are breaking the system! }
internally serialized as
<div data-template="&lt;p class=&quot;tip {tip-type}&quot;&gt;{tip-content}&lt;/p&gt;" data-tip-type="warning" data-tip-content="You are breaking the system!" />
This is according to the XML / HTML specs
- An element being content-editable AND controlled by Aloha.