Feature #26071

Generate markup for uploaded image dropped into wiki-edit textarea

Added by Felix Gliesche 6 months ago. Updated 5 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.4.0
Resolution:Fixed

Description

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.

9We0m7yICa.gif (124 KB) Felix Gliesche, 2017-05-30 16:14

0001-Generate-markup-for-uploaded-image-dropped-into-wiki.patch Magnifier (5.06 KB) Felix Gliesche, 2017-05-30 17:40


Related issues

Related to Redmine - Defect #10189: Inline image does not work with spaces in file name New
Related to Redmine - Feature #17438: Support embedding images/files in issue description Closed
Related to Redmine - Patch #26682: URL-escape the ! character in generated markup for droppe... Closed

Associated revisions

Revision 16643
Added by Jean-Philippe Lang 5 months ago

Generate markup for uploaded image dropped into wiki-edit textarea (#26071).

Patch by Felix Gliesche.

History

#1 Updated by Marius BALTEANU 6 months ago

Very nice improvement!

#2 Updated by Go MAEDA 6 months ago

  • Target version set to 3.4.0

I have been wanting this feature for a long time. It is a great improvement.
I tried out the patch and works very fine. I think there is no reason not to deliver this feature in upcoming 3.4.0.

#3 Updated by Felix Gliesche 6 months ago

A small update: This updated patch sanitizes filenames correctly.

#4 Updated by Vipama Lucyu 6 months ago

Worked for me at <<link removed>>

Edited by Mischa The Evil.

#5 Updated by Jan from Planio www.plan.io 6 months ago

  • File deleted (0001-Generate-markup-for-uploaded-image-dropped-into-wiki.patch)

#6 Updated by Fernando Hartmann 6 months ago

Great, could this patch support file names with spaces too? #10189

#7 Updated by Felix Gliesche 6 months ago

Fernando Hartmann wrote:

Great, could this patch support file names with spaces too? #10189

Yes! This patch works for filename with spaces, because it encodes the filename accordingly before generating the markup.

#8 Updated by Mischa The Evil 6 months ago

Nice improvement indeed. LGTM.

#9 Updated by Jean-Philippe Lang 5 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Nice, thanks!

#10 Updated by Toshi MARUYAMA 5 months ago

  • Related to Defect #10189: Inline image does not work with spaces in file name added

#11 Updated by Go MAEDA 4 months ago

  • Related to Feature #17438: Support embedding images/files in issue description added

#12 Updated by Go MAEDA 3 months ago

  • Related to Patch #26682: URL-escape the ! character in generated markup for dropped uploads added

Also available in: Atom PDF