Skip to content

Commit

Permalink
Fix ngModel rendering when initOnClick: true
Browse files Browse the repository at this point in the history
Resolves froala#223 by setting the ngModel view value to the fr-view element if the editor is not initialized.
  • Loading branch information
robinwassen committed Dec 3, 2019
1 parent f37efed commit c3e573e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/angular-froala.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
ctrl.froalaEditor.undo.reset();
ctrl.froalaEditor.undo.saveStep();
}
else if (ctrl.froalaEditor) {
ctrl.froalaEditor.el.innerHTML = ngModel.$viewValue || '';
}
}
};

Expand Down

0 comments on commit c3e573e

Please sign in to comment.