Django-CKEditor Image Upload

2019-04-10 07:33发布

I've currently installed Django-CKEditor and have my own custom toolbar.

I'm struggling to find how to enable image uploading. When clicking the Image button, I can only upload via URL. I know that, in the plugin, there are views to handle file browsing and uploading but I'm not sure how to activate or use these.

There is sparse documentation on the plugin so I am reaching out for your help!

https://github.com/shaunsephton/django-ckeditor

2条回答
萌系小妹纸
2楼-- · 2019-04-10 08:17

In the current version (5) you can use RichTextUploadingField instead of RichTextField, which enables uploading and browse files button.

Previously you have to install django-uploader package.

查看更多
地球回转人心会变
3楼-- · 2019-04-10 08:32

As I had mentioned in my question - Django CKEditor comes with a number of URLs to handle the viewing and browsing of images. The subsequent steps to activate this with your editor require you to add a filebrowserBrowseUrl when activating the editor and setting it to the appropriate /upload/ and /browse/ URLs.

See more here:

http://www.mixedwaves.com/2010/02/integrating-fckeditor-filemanager-in-ckeditor/

查看更多
登录 后发表回答