File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -212,3 +212,26 @@ schemaFormDecoratorsProvider.createDecorator('bootstrapDecorator', {
212
212
213
213
When the decorator is trying to match a form type against a tempate it first executes all the rules
214
214
in order. If one returns that is used as template, otherwise it checks the mappings.
215
+
216
+ For example to add a new template (in a similar manner you can map an existing type to a new template):
217
+
218
+ - Create your template
219
+ ``` html
220
+ <div class =" form-group has-feedback" ng-class =" {'has-error': hasError(), 'has-success': hasSuccess()}" >
221
+ <label ng-show =" showTitle()" >{{form.title}}</label >
222
+ <span class =" help-block" >{{ (hasError() && errorMessage(schemaError())) || form.description}}</span >
223
+ <textarea class =" form-control"
224
+ ckeditor
225
+ sf-changed =" form"
226
+ ng-required =" form.required"
227
+ ng-model =" $$value$$"
228
+ schema-validate =" form.schema" ></textarea >
229
+ </div >
230
+ ```
231
+ - Use the addMapping provider method in your app boostraping section:
232
+
233
+ ``` javascript
234
+ .config ([' schemaFormDecoratorsProvider' , function (decoratorsProvider ){
235
+ decoratorsProvider .addMapping (' bootstrapDecorator' , ' ckeditor' , ' path/to/ckeditor.html' );
236
+ }])
237
+ ```
You can’t perform that action at this time.
0 commit comments