JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.angularjs.org/angular-1.0.0rc4.min.js"></script>
<div ng-app>
<div ng-controller="Ctrl">
<div ng-click="showEditor()">{{text}}</div>
<div ng-show="editing">
<textarea autofocus>{{text}}</textarea>
</div>
</div>
</div>
JavaScript
function Ctrl($scope) {
$scope.text = "Hello, angularjs! (click me)";
$scope.showEditor = function() {
this.editing = !this.editing;
// how to let the areatext be focused ?
}
}