[英]Textarea in AngularJS not rendering HTML
我在Ionic的应用程序中有一个textarea,用于创建新消息或编辑消息。 我的问题是,当我尝试编辑消息时,textarea不会将String呈现为HTML标记。
我已经尝试设置ng-bind-html并使用$sce过滤器。
ng-bind-html
$sce
这是我尝试过的Plunker。
我不认为可以在textarea中绑定html,但是您可以尝试“ contenteditable”
<div ng-bind-html="text_field.text" contenteditable="true" ng-model="text_field.text" cols="50" rows="10">
看看这个plunkr: https ://plnkr.co/edit/WDvKdG ? p = preview
[英]Rendering HTML inside textarea
[英]AngularJS Render HTML in textarea
[英]Rendering HTML and CSS in Angularjs
[英]AngularJS rendering as plaintext in HTML
[英]angularjs save html from textarea
[英]AngularJS Element Directive Not rendering on the HTML
[英]HTML Page with AngularJS not rendering properly
[英]AngularJS - scope is not rendering the variables in HTML
[英]Issues with rendering HTML from a JSON string with AngularJS?
[英]Rendering a template into a trusted HTML string [AngularJS]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.