jazzband / django-tinymce

TinyMCE integration for Django
http://django-tinymce.readthedocs.org/
MIT License
1.25k stars 317 forks source link

Console Error #408

Closed Oynowan closed 1 year ago

Oynowan commented 1 year ago

Hi, i am having problems with running tinymce in my project.

What i am doing:

  1. pip install django-tinymce
  2. added tinymce to installed apps
  3. created field in my model with HTMLField from tinymce
  4. included tinymce url path('tinymce/', include('tinymce.urls')),
  5. And when i run server tinymce is not loading and in console i have the error tinymceError
  6. When i try with cdn TINYMCE_JS_URL = 'https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js' TINYMCE_COMPRESSOR = False it is working, but i want to use it from my statics not cdn.

What am i doing wrong?

Edit:

I am not sure why, but it started to work. I was trying to fix it for hours now. It just loaded all js and styles from static and boom it's here.

claudep commented 1 year ago

That was an issue with tinyMCE not loaded. Maybe we could add a guard with an explicit error when tinyMCE is not defined, before calling it.

claudep commented 1 year ago

Maybe something like #409, I wonder if issues like yours would be more easily debuggable.

Oynowan commented 1 year ago

It's weird because when it couldn't find tinyMCE i was getting 404 and when i managed 404 to disappear i thought it loaded, but i guess not. Yes, would be good if there was any error handler for tinyMCE not loaded, because would never thought thats the issue since i was not getting 404 and tinymceINIT was starting.