ui-tinymce icon indicating copy to clipboard operation
ui-tinymce copied to clipboard

On focus lost, ng-model not being updated

Open mjmarianetti opened this issue 8 years ago • 1 comments

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();
                });
            }
}

mjmarianetti avatar Dec 23 '16 14:12 mjmarianetti

Please post a plunker showing your issue or post a PR fixing your problem.

deeg avatar Dec 26 '16 22:12 deeg