Hi there,
I am trying to add an editor to my page and I am getting the following error:
startup.js:7Uncaught TypeError: $(…).trumbowyg is not a function
I have followed the instructions from:
http://alex-d.github.io/Trumbowyg/
What I have done is in my index.html file I have added the css to my header and the js to my body.
This is the same as I have done with all my other files and they have worked.
In my startup.js file which is in the root of the client folder I have:
import { Meteor } from ‘meteor/meteor’;
Meteor.startup(() => {
$(document).ready(function() {
$('#trumbowyg-demo').trumbowyg();
});
});
I have also tried:
Meteor.startup(() => {
$('#trumbowyg-demo').trumbowyg();
});
In my page I have:
<div className="body rows scroll-y">
<br/><br /><br />
<div id="trumbowyg-demo"></div>
</div>
When I am on my page in the browser and I type:
trumbowyg(); into the console it shows the error:
startup.js:7Uncaught TypeError: $(…).trumbowyg is not a function
I have updated meteor to 1.3.2.4
Is there a way to debug why this may be happening?
I have tried adding the css/js files to the bottom of my files etc to see if it is load order etc.