Tuesday 15 February 2011

How to use summernote with angularjs -



How to use summernote with angularjs -

i utilize summernote angularjs. have found https://github.com/outsideris/angular-summernote, doesn't work me. thing error

error: undefined not function (evaluating 'element.summernote(summernoteconfig)')

i have included required files jquery, bootstrap, summernote, etc.

my sec thought utilize summer note without angular-summernote directive. shouldn't work perfectly.

if try

$(document).ready(function() { $('.summernote').summernote(); });

summernote doesn't work, if seek sth. like

$.getscript('//cdnjs.cloudflare.com/ajax/libs/summernote/0.5.1/summernote.min.js',function(){ $('#summernote').summernote(); });

it works, utilize local re-create of summernote sec 1 isn't need

hope understood problem , help rico

ok guys, i've found problem, same problem it's stupid error ;)

the problem include main angular.min.js file before jquery bootstrap. include jquery first, bootstrap , angularjs , works perfect.

<link rel="stylesheet" type="text/css" href="bootstrap.css" /> <link rel="stylesheet" type="text/css" href="summernote.css" /> <script src="jquery-2.1.1.min.js"></script> <script src="bootstrap.min.js"></script> <script src="summernote.min.js"></script> <script src="angular.min.js"></script> <script src="angular-summernote.min.js"></script>

in order works perfect me.

a short tip, if have problem button size, thing include <!doctype html> in you're main html file.

rico

angularjs summernote

No comments:

Post a Comment