This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
upload images to the server and render it using image url #24
Closed
Activity
nishadmenezes commentedon Sep 18, 2017
This is possible by creating your own ImageHandler. Use this for reference -
Adding Custom Handlers
In Angular 4, Edit the onEditorCreated function -
faresayyad commentedon Sep 22, 2017
@nishadmenezes thank you man
deepakpapola commentedon Nov 6, 2017
@nishadmenezes @faresayyad can you explain bit more? still i cant upload image to server and the url provided by you is not valid
nishadmenezes commentedon Nov 6, 2017
* Just copy and paste the URL into the address bar of your browser I don't know what's wrong
What I have done is create a custom image handler that opens up a file dialog on clicking the image upload icon. Then, after saving the uploaded image, I am embedding an image into the quill-editor with the URL of the image I just uploaded.
According to docs, I am adding this custom image handler function to the toolbar of the quill editor so that it is called when the image icon is clicked.
deepakpapola commentedon Nov 6, 2017
@nishadmenezes can you tell how to open file dialog on image icon click
thanks
faresayyad commentedon Nov 6, 2017
@deepakpapola this is my implementation:
deepakpapola commentedon Nov 15, 2017
@faresayyad thanx men. did you use the image resize module also?
nishadmenezes commentedon Nov 15, 2017
Image resize module wasn't packaged as well as this module. I had problems getting it to work. Let me know if you manage that...
faresayyad commentedon Nov 15, 2017
@deepakpapola your'e welcome man, not yet because i'm dealing with backend right now, but i will try to configure it ASAP.
If you can use the image resize, please don't forget to share it hear.
deepakpapola commentedon Nov 15, 2017
@faresayyad @nishadmenezes sure bros 👍
lakinmohapatra commentedon Aug 27, 2018
const index = range.index + range.length;
this.editor.insertEmbed(range.index, 'image', this._returnedURL);
Above code is not working for getting current cursor location.
My image is always inserted at top.
Please help.
sujeetSharna commentedon Sep 1, 2018
image uploading is working properly
madhavan-sundararaj commentedon Feb 2, 2019
Hey @faresayyad is ql-image your custom class?
m7ammad7assan commentedon Apr 11, 2019
it is not working for me the server cannot recognize the post as image !