ui-tinymce
ui-tinymce copied to clipboard
On focus lost, ng-model not being updated
When you have text in the editor, and you erase it selecting it and pressing backspace. The directive does not update the ng-model.
Quickfix (I am using typescript, the example might not work but you get the idea):
$scope.model; $scope.ngModelCtrl;
$scope.tinymceOptions = {
setup = (editor) => {
editor.on('keyup',(e) =>{
$scope.ngModelCtrl.$setViewValue($scope.model);
$scope.ngModelCtrl.$setTouched();
$scope.ngModelCtrl.$setDirty();
});
}
}
Please post a plunker showing your issue or post a PR fixing your problem.