Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browserify - Uncaught TypeError: $(...).froalaEditor is not a function #931

Closed
dsdenes opened this issue Nov 19, 2015 · 1 comment
Closed

Comments

@dsdenes
Copy link

dsdenes commented Nov 19, 2015

Error: "Uncaught TypeError: $(...).froalaEditor is not a function"

The stack uses Browserify.

var $ = require('jquery');
require('node_modules/froala-editor/js/froala_editor.min.js');

$(function() {
  var $target = $('<div>').appendTo('body');
  $target.froalaEditor()
});
@stefanneculai
Copy link
Contributor

Sorry, this took a bit longer to check. It's not an editor problem, but you're not requiring it correctly. You should also pass the jQuery variable like this:
require('node_modules/froala-editor/js/froala_editor.min.js')($);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants