Open Piedone opened 4 years ago
This is a neat feature but it require some thinking as you mentioned before:
For the name GUID
may be suited
For location we could create a temp
folder in media, so temporary images could be stored there
Another option is to convert the image into base64, so name or location is required
Done in O1, was not hard, there are libraries to do that.
Really, it's in O1? Didn't know and tried the latest dev, it doesn't seem to work with TinyMCE.
Trumbowyg already has a paste image plugin (included in OC) that generates a base64 img: https://alex-d.github.io/Trumbowyg/demos/#plugins-pasteimage
That's great though I think uploading to flat files is better (as these can be served directly from a CDN).
In certain apps, like the comment boxes here on GitHub too, you can paste an image into the text from the clipboard. So if you've taken a screenshot for example, then you don't have to save it to a file and upload it but you can just directly paste it.
The suggestion is about having the same functionality for Orchard's WYSIWYG fields: Instead of having to browse for a Media file you'd get instant upload and insert.
This would require some cross-module functionality. It's a question how these images should be named and where they should be saved to. Possibly the name could be auto-generated as a random GUID or on paste you could specify it. If the latter then you could also browse to the folder where you want it saved.