[英]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.