forked from textAngular/textAngular
-
Notifications
You must be signed in to change notification settings - Fork 12
Getting Started
Dave Birch edited this page Feb 27, 2014
·
7 revisions
Demo is available at: http://www.textangular.com
-
AngularJS≥1.2.x; -
textAngular-SanitizeThis is a fork of Angular Sanitize v1.2.x. The standard Angular Sanitize strips out some attributes that it shouldn't in the case of textAngular.
- Bootstrap 3.x for the default styles
- Font-Awesome 4.x for the default icons on the toolbar
- Rangy 1.x for better activeState detection and more dynamic plugins, also the selectionsaverestore module.
- Get textAngular via
bower install textAngular, using the cdn at http://cdnjs.cloudflare.com/ajax/libs/textAngular/1.1.2/textAngular.min.js or from the github page https://github.com/fraywing/textAngular/releases/latest - Include textAngular.js or textAngular.min.js in your project using script tags
- Include textAngular-sanitize.js, textAngular-sanitize.min.js or angular-sanitize.min.js in your project using script tags
- Add a dependency to
textAngularin your app module, for example:angular.module('myModule', ['textAngular']). - Create an element to hold the editor and add an
ng-model="htmlVariable"attribute wherehtmtlVariableis the scope variable that will hold the HTML entered into the editor:
<div text-angular ng-model="htmlVariable"></div>OR (Only in Non IE browsers)
<text-angular ng-model="htmlVariable"></div>This acts similar to a regular AngularJS / form input if you give it a name attribute, allowing for form submission and AngularJS form validation.
Have fun!