Adding image upload to Quill editor#5364
Adding image upload to Quill editor#5364armandfardeau wants to merge 6 commits intodecidim:masterfrom armandfardeau:feature/quill-enhanced
Conversation
|
Looks good to me, @andreslucena and @carolromero thoughts? |
|
@oriolgual Looks good to me too |
|
just linking another PR that was doing the same but not accepted because we were waiting to migrate to rails 6 Trix editor: #4595 Aren't both doing the same? |
|
In favor, the other PR died of inactivity due the discussion about waiting for rails 6. But, let's be realistic, I don't think we are going to migrate anytime soon. Meanwhile this will work for many people. |
|
@andreslucena are you OK with merging this? |
|
@tramuntanal Currently, this does something a little bit different. It adds a way to upload AND resize an image. I agree with most of the point of views against this but...
I explored many ways to mimic this behavior, async uploader, text parser. |
|
Hey, I liked this feature very much so let's add it! But at the moment of the other PR there was a member of the community also wanting it and he was not allowed to. Since that PR they did not contribute anymore to the project because they were frustrated. It seems that sometimes decisions are randomly made, just wanted to note that, that's all (maybe the channel I should have used is the meta I'm not sure, don't want to open a discussion anyway). |
|
We have so many admins begging for this ! |
|
Just to give some feedback: I keep thinking the same about having base64 images on the admin panel. I think we all agree that's far from the optimal solution. It has Performance problems and Caching problems. Thinking a little more on this issue I can see also Backup problems: |
|
Thank you @andreslucena for pointing out the technical problems that this fix can bring. What do you think of this @oriolgual? And the rest of devs? |
|
@andreslucena is completely right, but I think that pretty much everyone is already introducing images in base64 format in their Decidim installations by using the "Drag&Drop trick". This just makes life easier for admins. However, if not approved, customs installation can overwrite those views to add this field as a workaround until Rails 6 is here. |
|
Maybe there's a workaround: we could use Quill's feature, but then at the backend parse the content of the textfield, extract the image in base64, add it as a regular attachment and then change the content of the text with the attachment URL. What do you think? |
This could be done in an async job too, this way the user doesn't have to wait too much |
|
The async job would provide backward compatibility with the current situation. We could even merge this PR and create in the future this job to parse all existing content and replace blobs. |
|
I would be happy to work on an async job to parse the body and upload it as an image. I'm just afraid it cannot be done shortly as this feature has not been funded. |
|
@tramuntanal can you chime in on the last proposed solution please? |
|
Hi all, Upgrading to Rails 6 won't solve the problem "per se", because when we say "upgrading to rails 6" we're implicitly saying "migrating to Trix editor" no? So, my position is that it will take long until we're into Trix, but we must go there. Meanwile we can apply @oriolgual 's patch in an encapsulated processor that will be easy to remove later. |
|
Hi @armandfardeu |
Just so we can keep focus on the rest of the PRs, I'm going to close this issue until you guys have funding available to make this change on the logic. @armandfardeau thanks for your work and dedication on this issue |
🎩 What? Why?
Adds an option to add images in the Quill editor on the administrator side (where the editor was previously "full").
The images are uploaded in Base64 format and can be resized.
📋 Subtasks
CHANGELOGentry📷 Screenshots (optional)