This TextAngular add-on uses as the name implies the TextAngular plugin to provide a rich text editor that serves up HTML.
By the way, this was completely ripped off of Texttalk's Angular Schema Form TinyMCE plugin.
The editor is an add-on to the Bootstrap decorator. To use it, just include
bootstrap-ta.min.js after dist/bootstrap-decorator.min.js.
Easiest way is to install is with bower, this will also include dependencies:
$ bower install angular-schema-form-text-angularYou'll need to load a few additional files to use the editor:
Be sure to load this projects files after you load angular schema form
- Angular
- The TextAngular source file
- Angular Schema Form
- The Angular Schema Form TextAngular files (this project)
Example
<script src="/bower_components/angular/angular.min.js"></script>
<script src="/bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="/bower_components/textAngular/dist/textAngular.js"></script>
<script src="/bower_components/textAngular/dist/textAngularSetup.js"></script>
<script src="/bower_components/angular-schema-form/schema-form.min.js"></script>
<script src="/bower_components/angular-schema-form-text-angular/bootstrap-ta.js"></script>When you create your module, be sure to depend on this project's module as well.
angular.module('yourModule', ['schemaForm', 'schemaForm-textAngular']);The TextAngular add-on adds a new form type, wysiwyg, and a new default
mapping.
| Form Type | Becomes |
|---|---|
| wysiwyg | a TextAngular widget |
| Schema | Default Form type |
|---|---|
| "type": "string" and "format": "html" | textangular |
Please see TextAngular documentation for applying configuration options.