javascript - angularjs save html from textarea -


this html:

      <div ng-if="!item.edit>            <div class='door-description' ng-bind-html="item.description"></div>            <div class='door-softvalues' ng-bind-html="item.softvalues" ng-if="item.isconfiguration"></div>       </div>    <div ng-if="item.edit">     <textarea elastic class='door-description' ng-bind-html="item.description" ng-model="item.description"></textarea>     <textarea elastic class='door-softvalues' ng-bind-html="item.softvalues" ng-if="item.isconfiguration" ng-model="item.softvalues"></textarea> </div> 

so linebreak looks when im in edit mode , edit textarea when save text , retrieve again looses linebreaks.

here looks when editing:

enter image description here

and here looks when not editing:

enter image description here

i can still toggle between edit , not editing , same result.

what have make linebreaks appear when not editing?

can try using pre tag:

<pre class='door-description' ng-bind-html="item.description"></pre> 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -