UNPKG

angular-summernote

Version:
58 lines (49 loc) 1.32 kB
<!DOCTYPE html> <html lang="en" ng-app="summernoteDemo"> <head> <title>Angular-summernote Demo</title> <!--summernote dependencies--> <script src="components/jquery/dist/jquery.min.js"></script> <link rel="stylesheet" href="components/bootstrap/dist/css/bootstrap.min.css"> <script src="components/bootstrap/dist/js/bootstrap.min.js"></script> <link rel="stylesheet" href="components/font-awesome/css/font-awesome.min.css"> <!--summernote--> <link rel="stylesheet" href="components/summernote/dist/summernote.css" /> <script src="components/summernote/dist/summernote.js"></script> <script src="components/summernote/lang/summernote-de-DE.js"></script> <style> body { margin: 10px 20px; } h2, h4, h5, h6 { background-color: #eee; padding: 10px; } h4 { margin-left: 20px; } .example { margin-left: 40px; } </style> </head> <body> <div ng-controller="CodeCtrl"> <h4>use ngModel to synchronize the value</h4> <div class="example"> <div id="sn"></div> </div> </div> <script> $(document).ready(function() { $('#sn').summernote({ callbacks: { onChange: function(contents, $editable) { console.log('onChange:', contents, $editable); } } }); }); </script> </body> </html>