javascript - bootstrap-wysihtml5 is not working -


i want include wysiwyg editor in web page designing. came across bootstrap-wysihtml5. of it, want (simple , elegant). wanted @ example there not many examples showing how set up. far have done this:

<!doctype html> <html> <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8">     <title>editor</title>     <link rel="stylesheet" type="text/css" media="screen" href="bootstrap-wysihtml5.css"/>     <script src = "bootstrap-wysihtml5.js" type = "text/javascript"></script>     <script src = "wysihtml5-0.3.0.min.js" type = "text/javascript"></script>     <script src = "bootstrap.min.js" type = "text/javascript"></script> </head> <body>    <textarea class="textarea" id="ta1" placeholder="enter text ..." style="width: 810px; height: 200px">    </textarea>    <script>$(".textarea").wysihtml5();</script> <body> </html> 

these errors in chrome console:

uncaught typeerror: cannot read property 'fn' of undefined             bootstrap-wysihtml5.js:368 uncaught typeerror: undefined not function                        bootstrap.min.js:6 uncaught typeerror: object [object object] has no method 'wysihtml5'   editor.html:14 

i don't know how solve these errors, think going wrong?

thanks.

you'll need include jquery work, first script-element in case.

bootstrap highly depends on jquery, , "wysihtml5" - plugin too, jquery has included before those.

you can see through error-log:

the first hint fn:

uncaught typeerror: cannot read property 'fn' of undefined    

fn prototype - "wrapper" of jquery, bootstrap tries add prototype of jquery on line.

second hint:

uncaught typeerror: object [object object] has no method 'wysihtml5'  

$ bound selector-function in chrome per default, returns usual html-element, not jquery-object in case. wysihtml5 bind jquery - prototype, can called on jquery-elements in way. jquery not present, try call function normal object doesn't exist in case.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -