Reputation: 23
I'm sort of new to Rails, and very new to jquery. I am trying to get a markdown editor working similar to the one I'm writing in now. The rails app also uses twitter-bootstrap and social-share.
I am currently testing jquery-wysiwym but get the following error:
Uncaught TypeError: Object [object Object] has no method 'wysiwym'
My page has the following in head:
...
<link href="/assets/statuses.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/types.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/wysiwym/wysiwym.css?body=1" media="all" rel="stylesheet"type="text/css" />
And this at the bottom of the page:
...
<script src="/assets/social-share-button.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery-ui.js?body=1" type="text/javascript"></script>
<script src="/assets/wysiwym/wysiwym.js?body=1" type="text/javascript"></script>
...
<script src="/assets/application.js?body=1" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.markdown').wysiwym(Wysiwym.Markdown);
});
</script>
</body>
Any help appreciated as I'm a bit stuck.
Upvotes: 2
Views: 202