I am using Angular 4 and I am trying to toggle contenteditable="true" / contenteditable="false"
I've got this:
<h1 (dblclick)="edit($event)" contentEditable="true">Double-click Here to edit</h1>
or I could also have a checkbox if its easier to toggle edit mode?
<input type="checkbox" name="" value="" (onchange)="edit($event)">Toggle Edit mode
and on the .ts file:
edit(event) {
// code here needed
}