I am trying to do addapt the contenteditable directive I foud on angularjs website (http://docs.angularjs.org/guide/concepts#directives).
My problem is that if I change the value inside the contenteditable div inside my controller, the scope value is updated but the value in the div isn't. I would like to be able to do something like this in my main controller :
$scope.content = $scope.content.concat("added text");
This updated the $scope.content but it does not update the contenteditable div. And so, if I click in the div to edit it, my modification is gone.
In order to make it work, I would have to call ctrl.$render from my controller but I can't find any documentation on what is this 4th parameter of the link function.
Does anyone have an idea what this 'ctrl' parameter represents and if by change some know how to solve my problem :)
As of this writing (3/20/2013), there are two problems with the Plunker from the forms page:
form-example. <html ng-app="form-example2">contentEditable should be contenteditable. <div contenteditable ng-model="content">Some content</div>Plunker with link to append to $scope.content in the controller.