Generate markup for uploaded image dropped into wiki-edit textarea
|Assignee:||Jean-Philippe Lang||% Done:|
As it is already possible to upload files by using drag n drop, it'd be a great UI improvement to immediately generate the markup for an image when dragged into a textarea. We have seen this feature at github and think it would be a great UI improvement to redmine. For example, if you drag an image into an issue's description field you'll get
!image.png! (if formatting is set to textile) or
!(image.jpg) (if formatting is set to markdown) at the current cursor position.
I am attaching a patch that introduces this feature into redmine. Allowed are all image file types that are listed in redmine's mime_types. The behavior remains the same for all other file types / non-image file types.
#3 Updated by Felix Gliesche 4 months ago
A small update: This updated patch sanitizes filenames correctly.