-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to insert images by uploading to the server instead of Base64 encoding the images #137
Comments
@qiulang is this mostly to overcome the need to access the raw stream of an upload vs using the regular file post methods? There are a lot of advantages over using the base64 string - such as not needing a library to manage the image preview in the browser and allowing for cut-and-paste from other sources like editing apps. Do we just need to provide some better examples of how to handle the file upload? |
@qiulang as @steveathon states, I believe the idea behind this entire package is to keep things as simple as possible and therefore limit dependencies and therefore allow for its use in the largest range of environments. That being said, there is nothing preventing you from converting the base64 string your server receives and turning into a stand-alone image stored somewhere on your server and modifying the resultant HTML code to point to that image instead of in-lining it. I'm not sure what your particular use case is, but (I imagine) this would be fairly trivial to do with PHP. If you could provide us with more details of what you're trying to accomplish, perhaps we could point you in the right direction. |
@steveathon @kaptainkommie, thanks for answering my question. In my particular case it is
and just like you said we actually
I do have a question, as you guys said "there are advantages over using the base64 string". So what is the advantage of using base64, except it is simple ? |
The other concern I have about is image file size the editor supports. As I read in many places, base64 image strings is only good for small images. |
Also just noticed in @kaptainkommie's post.
I think this is the best course of action - if you can background upload the images in the editor. Perhaps what is missing from the editor is an event firing when an image is pasted. |
@steveathon Isn't insertFiles() fired when an item is dropped onto the editor? |
This issue had been raised several times against original bootstrap-wysiwyg without a solution, e.g.
mindmup#156
mindmup#184
So can it be fixed here ?
The text was updated successfully, but these errors were encountered: