Skip to content

Displaying HTML v1.1.x

SimeonC edited this page Feb 18, 2014 · 1 revision

There are several ways of displaying content from the HTML editor. The easiest if you don't mind the restrictions of no style attributes is using ng-bind-html. If this is too restrictive for you our internal ta-bind directive to display exactly as shown in the editor.

<div ta-bind="text" ng-model="htmlcontent"></div>

To explain this, ta-bind="text"; this invokes the ta-bind directive in 'text' or WYSIWYG mode, any other value will show the raw html. ng-model="htmlcontent" this tells the ta-bind directive that the HTML code to display is contained in the $scope.htmlcontent variable.

Clone this wiki locally