Reputation: 11
I am trying to use an editable div tag and after editing I am trying to access its content using angular 2 syntax:
<div contenteditable="true" >
{{sentence}}
</div>
Upvotes: 0
Views: 116
Reputation: 14201
You can access the innherHTML
property of the div to find out the content of the div
like so:
<div contenteditable="true" (blur)="contentChanged($event.currentTarget.innerHTML)">
{{sentence}}
</div>
Upvotes: 1