I've been trying to get django-filebrowser
working in django-tinymce
(using MCE v4.0.x) for a while now, and still can't get the file browser callback to work. Here's what I've done so far:
Installed TinyMCE via pip, added necessary settings including the following default config:
TINYMCE_DEFAULT_CONFIG = { 'theme': 'modern', 'relative_urls': False, 'plugins': 'image', }
Used TinyMCE as a widget in one of my forms, like so:
content = forms.CharField(widget=TinyMCE(attrs={'cols': 100, 'rows': 30}))
Installed filebrowser (
pip install django-filebrowser
), added it toINSTALLED_APPS
. Also added the settingTINYMCE_FILEBROWSER=True
to settings, along with the necessary filebrowser settings.
I now have the result that a file browser button appears in the 'add image' dialog in TinyMCE, but when I click it I get the following error in my browser's JS console:
Uncaught TypeError: string is not a function
I also get the following Javascript error about loading the filebrowser plugin:
Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR) http://localhost:8080/tinymce/filebrowser/