Comments (7)
Yes, the editor is very nice and I've replaced redactor with this editor myself. django-froala-editor does support image uploads, just make sure you are including the url as instructed in Getting Started section of the readme.
Add the following line to urlpatterns
in your application’s
urls.py
.
url(r'^froala_editor/', include('froala_editor.urls')),
Including this url makes the view for saving the uploaded image available. Images from remote URLs can still be embedded without this.
from django-froala-editor.
Thank you! Sounds great. Wish I had this a few months back when I was fighting with getting image uploads working with TinyMCE 4. I'll likely use this going forward.
from django-froala-editor.
I've followed these instructions and I'm struggling to get image uploads working. Are there any other settings?
from django-froala-editor.
@davemutton I did a lot of customization on my end to get things working how I wanted with Froala. I used the option that Froala provides for image upload url: https://editor.froala.com/options#imageUploadURL and then created my own view which handles the image upload.
from django-froala-editor.
@deronsizemore
Am you able to.share that view? I'm not sure where to start
from django-froala-editor.
@davemutton I'm actually using the django-froala app and started with their view which is here: https://github.com/froala/django-froala-editor/blob/master/froala_editor/views.py#L10
I set my imageUploadURL option for Froala to:
imageUploadURL: "/froala/image_upload/",
I also found that I needed to pass in the csrf_token to the upload view, so I have this option for Froala also:
imageUploadParams: {'csrfmiddlewaretoken': '{{ csrf_token }}'},
I'm initializing Froala right inside of my
tag so that I can pass in the csrf_token.If it will help, here's my exact view for uploading: http://pastebin.com/h1ffPZ5V
Heavily customized as you can see, but I started with the base django-froala view from above. I customized it because I'm storing uploads to Amazon S3
Hope that helps.
from django-froala-editor.
Thanks.. That gives me a place to start!
from django-froala-editor.
Related Issues (20)
- Django 3.2 not supported due to missing db_collation support HOT 1
- Add newer versions to Python Package Index HOT 1
- Using the License Key HOT 1
- 4.0.4 not availbale on PyPI HOT 4
- Is this still maintained? I mean really maintained and not just having js/css files updated?
- missing files froala-django.css and froala-django.js HOT 2
- Static Collection failing on Django 4.0 HOT 3
- Writing a Third Party Plugin HOT 1
- Cant upload photos HOT 1
- json encoding of option should use DjangoJSONEncoder
- image/webp should be added to allowed image types
- Image upload not working HOT 4
- bug report, uploading image with same filename HOT 1
- Can not upload videos HOT 2
- CSS Layers of link "popup" is broke
- Everythign works except the Manage Images
- When will 3.1.1 be pushed out for Django Froala? HOT 1
- No Uploading multiple images
- Django 3.0, admin inlines, throws JS error when new inline formset is added HOT 2
- Maximum call stack size exceeded. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-froala-editor.