Closed
Description
I am using the lib for a mobile app and I will love to be able to extend the current functionality of the image handler to grab the image data and post it before embedding it to the editor and I was wondering if this was possible and if I could get some help in implementing this.
- hit the image icon
- quill handler runs file dialogue
- user clicks on file
- file datauri is returned by quill but the I convert that to a file and upload and use the returned link instead of base64 obj.
Thanks.
Activity
jwstevens-ii commentedon Apr 24, 2017
Yes! I am also trying to do this exact same thing. We are storing the contents in a SQL database and do not want to store the base64 data of any images.
cozzbie commentedon Apr 25, 2017
You can try something like this to overwrite the default image insert functionality and insert your own instead. @jwstevensii
Matoo125 commentedon Jun 16, 2017
So how does this image uploading works? I just cannot find good example here. Is it possible to add button to toolbar which will open my custom gallery modal where I can select one of my uploaded images or upload new and it will return image url back to editor?
Skura23 commentedon Jul 17, 2017
I met exactly same problem, don't know how to solve it.
cozzbie commentedon Jul 17, 2017
The
imgHandler
in the example is a function that gets passed a parameter, you could literally rewrite it asTry running tests to see what gets returned by the quill editor.
Matoo125 commentedon Jul 17, 2017
#863 (comment) This is very nice example, which helped me solved this problem. It is very easy to implement.
Skura23 commentedon Jul 18, 2017
I finally solved the problem by using Ajax to upload image to server.
Here are some links that I find useful (if you want to using ajax to implement this upload function, too).
How can I upload files asynchronously?
Ajax POST request via jQuery and FormData - $_POST empty on PHP
Suggestions above are useful when you embed the upload function in your quill editor.
TaylorPzreal commentedon Jul 27, 2017
I solved the problem that upload image with url.
This is my code, hope help you:
Quill is awesome and easy to extensible.
psuplat commentedon Aug 14, 2017
@TaylorPzreal - I get the
missing ) after formal parameters
error on the saveToServer function, which prevent the editor from loading altogether. Any ideas?papac commentedon Sep 24, 2017
@TaylorPzreal thank you.
larryisthere commentedon Dec 5, 2017
@TaylorPzreal Don't forget to implement by ourselves the ways to manage the images uploaded.
MarcGodard commentedon Apr 5, 2018
@TaylorPzreal I would add one line:
19 remaining items