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

$(...).froalaEditor is not a function #9

Open
reggin opened this issue Feb 15, 2016 · 21 comments
Open

$(...).froalaEditor is not a function #9

reggin opened this issue Feb 15, 2016 · 21 comments
Labels

Comments

@reggin
Copy link

reggin commented Feb 15, 2016

Hi
Just installed your bundle. I've add configuration, add froala to form (a form field type). And have error $(...).froalaEditor is not a function.
froala_editor.min.js loaded also. What could be the problem?

@sguionni
Copy link
Contributor

Hi,
do you manually loads javascript or let the bundle include it ?

@reggin
Copy link
Author

reggin commented Feb 18, 2016

Hi,
Sorry for delay. I let bundle to include it. Now I tried to include manually - and it works now, thanks!

@reggin
Copy link
Author

reggin commented Feb 18, 2016

@Jakub-Fajkus
Hardcode :)
<script src="{{ asset( 'bundles/kmsfroalaeditor/froala_editor_2.1.0/js/froala_editor.min.js' ) }}"></script>

The same I've added plugins and styles.

@sguionni sguionni self-assigned this Feb 18, 2016
@sguionni sguionni added the bug label Feb 18, 2016
@sguionni
Copy link
Contributor

I'll take a look and maybe ask you some questions about your configuration, libraries...

@Jakub-Fajkus
Copy link

I think I found the problem.
I am trying this on dev environment which is much slower than production. On production, it works without problem. I suppose the problem was because the jQuery's function ready() got triggered before the "froala_editor.min.js" file was fully loaded.

@pedrocasado
Copy link

I used to load all javascripts at the botton of the page and was having the same problem..

I just had to put jQuery js on the tag and everything loaded correctly.

@ghost
Copy link

ghost commented Jul 29, 2016

I have the same problem too

@dcognata
Copy link

Same problem

@sguionni
Copy link
Contributor

sguionni commented Sep 9, 2016

Yes, sometimes javascript files are not fully loaded, or some plugins are missing, need to investigate..

@ghost
Copy link

ghost commented Sep 12, 2016

I have the same problem.

@jk-
Copy link

jk- commented Sep 27, 2016

Samething happened to me. I put includeJS to false in the config.yml and then included it myself. That solved the problem.

@ghost
Copy link

ghost commented Sep 27, 2016

Me too.

@krisElphenor
Copy link

Same problem for me. But even after including the js manually, i still got the same error.

@ghost
Copy link

ghost commented Dec 14, 2016 via email

@krisElphenor
Copy link

@gacel112 Yes, I tried that as well, no luck so far...still getting the same error

@krisElphenor
Copy link

I solved it by using the getScript function of jQuery.

$.getScript("/path/to/js/froala_editor.min.js", function () { $( "textarea" ).froalaEditor({ ... }); });

Apparently, for me as well, the problem is the js not being fully loaded when the function froalaEditor is called. But i cant't explain why, even after loading the script manually both in the header and at the bottom of the page, I still get the same issue.

So, if someone else has the same problem, jquery getscript could be your 'plan C'

@somoza
Copy link

somoza commented Oct 15, 2018

Same here... No solution jet?

@seddighi78
Copy link

Same problem ...

@Levii01
Copy link

Levii01 commented Jan 12, 2020

Also same

@sguionni sguionni removed their assignment Apr 28, 2020
@dev-vishnupundhir
Copy link

same issue

@Mifrill
Copy link

Mifrill commented Nov 24, 2020

any updates here?

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

No branches or pull requests