Environment: AngularJS 1.5.8, froala-editor 2.6.4, angular-froala latest version
1、try to set parameter to NULL by a button click, it's worked;
2、bind the step1's parameter to froala as ng-model; // {"contents":"<h1>Hello World</h1>"}
3、click button once, parameter changed but remain something; // {"contents":""}
4、click button again, parameter finally comes to NULL; // NULL
Code
---------------------HTML--------------------
<textarea ng-model="richtext.contents" froala></textarea><!-- can observe it carefully -->{{richtext}}<button ng-click="clear()">Clear</button>
PS: other froala functions are test and passed, it seems not a config problem;
The problem seems occured in complicate parameter, like $scope.richtext.contents. simple parameter as $scope.richtext is OK.
Environment: AngularJS 1.5.8, froala-editor 2.6.4, angular-froala latest version
1、try to set parameter to NULL by a button click, it's worked; 2、bind the step1's parameter to froala as ng-model; //
{"contents":"<h1>Hello World</h1>"}
3、click button once, parameter changed but remain something; //{"contents":""}
4、click button again, parameter finally comes to NULL; // NULLCode ---------------------HTML--------------------
<textarea ng-model="richtext.contents" froala></textarea>
<!-- can observe it carefully -->
{{richtext}}
<button ng-click="clear()">Clear</button>
---------------------JS------------------------
$scope.richtext = {};
$scope.richtext.contents = "<h1>Hello World</h1>";
$scope.clear = function() {
$scope.richtext = null;
}
PS: other froala functions are test and passed, it seems not a config problem; The problem seems occured in complicate parameter, like $scope.richtext.contents. simple parameter as $scope.richtext is OK.