Updated StreamField blocks API (markdown)

master
gasman 2014-12-08 11:46:17 -08:00
rodzic f9f0ff10ec
commit 426edec7ce
1 zmienionych plików z 8 dodań i 1 usunięć

@ -213,4 +213,11 @@ Return the Javascript parameter list (a string consisting of zero or more JS exp
### default
The default value for blocks of this type; used as the initial value for newly-created instances of this block. For our shopping list, this is `[]`.
The default value for blocks of this type; used as the initial value for newly-created instances of this block. For our shopping list, this is `[]`.
## Addendum
Implementation details that should be covered here (but aren't totally set in stone yet):
* Javascript API refactor - rather than two levels of indirection (meta-initialiser and initialiser), there's just an initialiser function that takes js_declaration_param and prefix as its two parameters
* BoundBlock as a helper; calls to js_declaration_param should be done as block_factory.bind(val, prefix).js_declaration_param() rather than block_factory.js_declaration_param(val) so that blocks can potentially subclass BoundBlock to carry extra data around