@@ -6,7 +6,7 @@ require("ember-handlebars/controls/select");
66
77/**
88@module ember
9- @submodule ember-handlebars
9+ @submodule ember-handlebars-compiler
1010*/
1111
1212function normalizeHash ( hash , hashTypes ) {
@@ -29,30 +29,32 @@ function normalizeHash(hash, hashTypes) {
2929 An `{{input}}` with no `type` or a `type` of `text` will render an HTML text input.
3030 The following HTML attributes can be set via the helper:
3131
32- * `value`
33- * `size`
34- * `name`
35- * `pattern`
36- * `placeholder`
37- * `disabled`
38- * `maxlength`
39- * `tabindex`
32+ * `value`
33+ * `size`
34+ * `name`
35+ * `pattern`
36+ * `placeholder`
37+ * `disabled`
38+ * `maxlength`
39+ * `tabindex`
40+
4041
4142 When set to a quoted string, these values will be directly applied to the HTML
4243 element. When left unquoted, these values will be bound to a property on the
4344 template's current rendering context (most typically a controller instance).
4445
45- Unbound:
46+ ## Unbound:
4647
4748 ```handlebars
4849 {{input value="http://www.facebook.com"}}
4950 ```
5051
52+
5153 ```html
5254 <input type="text" value="http://www.facebook.com"/>
5355 ```
5456
55- Bound:
57+ ## Bound:
5658
5759 ```javascript
5860 App.ApplicationController = Ember.Controller.extend({
@@ -61,15 +63,18 @@ function normalizeHash(hash, hashTypes) {
6163 });
6264 ```
6365
66+
6467 ```handlebars
6568 {{input type="text" value=firstName disabled=entryNotAllowed size="50"}}
6669 ```
6770
71+
6872 ```html
6973 <input type="text" value="Stanley" disabled="disabled" size="50"/>
7074 ```
7175
72- ### Extension
76+ ## Extension
77+
7378 Internally, `{{input type="text"}}` creates an instance of `Ember.TextField`, passing
7479 arguments from the helper to `Ember.TextField`'s `create` method. You can extend the
7580 capablilties of text inputs in your applications by reopening this class. For example,
@@ -83,20 +88,21 @@ function normalizeHash(hash, hashTypes) {
8388 ```
8489
8590 ## Use as checkbox
91+
8692 An `{{input}}` with a `type` of `checkbox` will render an HTML checkbox input.
8793 The following HTML attributes can be set via the helper:
8894
89- * `checked`
90- * `disabled`
91- * `tabindex`
92- * `indeterminate`
93- * `name`
95+ * `checked`
96+ * `disabled`
97+ * `tabindex`
98+ * `indeterminate`
99+ * `name`
94100
95101 When set to a quoted string, these values will be directly applied to the HTML
96102 element. When left unquoted, these values will be bound to a property on the
97103 template's current rendering context (most typically a controller instance).
98104
99- Unbound:
105+ ## Unbound:
100106
101107 ```handlebars
102108 {{input type="checkbox" name="isAdmin"}}
@@ -106,23 +112,26 @@ function normalizeHash(hash, hashTypes) {
106112 <input type="checkbox" name="isAdmin" />
107113 ```
108114
109- Bound:
115+ ## Bound:
110116
111117 ```javascript
112118 App.ApplicationController = Ember.Controller.extend({
113119 isAdmin: true
114120 });
115121 ```
116122
123+
117124 ```handlebars
118125 {{input type="checkbox" checked=isAdmin }}
119126 ```
120127
128+
121129 ```html
122130 <input type="checkbox" checked="checked" />
123131 ```
124132
125- ### Extension
133+ ## Extension
134+
126135 Internally, `{{input type="checkbox"}}` creates an instance of `Ember.Checkbox`, passing
127136 arguments from the helper to `Ember.Checkbox`'s `create` method. You can extend the
128137 capablilties of checkbox inputs in your applications by reopening this class. For example,
@@ -280,7 +289,7 @@ Ember.Handlebars.registerHelper('input', function(options) {
280289 </textarea>
281290 ```
282291
283- ### Extension
292+ ## Extension
284293
285294 Internally, `{{textarea}}` creates an instance of `Ember.TextArea`, passing
286295 arguments from the helper to `Ember.TextArea`'s `create` method. You can
0 commit comments