Generate markup for uploaded image dropped into wiki-edit textarea
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.
Updated by Felix Gliesche over 6 years ago
- File 0001-Generate-markup-for-uploaded-image-dropped-into-wiki.patch 0001-Generate-markup-for-uploaded-image-dropped-into-wiki.patch added
A small update: This updated patch sanitizes filenames correctly.