Skip to content
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

[Feature Request] Allow dragging images into textareas #14982

Closed
delvh opened this issue Mar 13, 2021 · 5 comments
Closed

[Feature Request] Allow dragging images into textareas #14982

delvh opened this issue Mar 13, 2021 · 5 comments
Labels
issue/duplicate The issue has already been reported. type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@delvh
Copy link
Member

delvh commented Mar 13, 2021

  • Gitea version (or commit ref): 1.14.0+dev-841-g3c7582061

Description

GitHub allows to drag images from the dragboard directly into any text area instead of dragging it to an upload section below which seems more intuitive to understand and with less code necessary.

What to implement

Also give the textarea the ability to accept dragged images, and insert them not as an attachment, but as part of the message (meaning basically the same behavior as when "Ctrl + V" was pressed with an image in the clipboard).

GitHub even went so far as to completely integrate the "upload section" of a textarea into the textarea itself, resulting in a smaller webpage being displayed.
This could also be considered (maybe later on), as the only purpose of the upload section, once this gets implemented, is to open the file system dialog, and nothing else.

Screenshots

Current appearance:
image

Appearance when using manual attachments versus ![image] (at the top):
image

@zeripath zeripath added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Mar 13, 2021
@a1012112796
Copy link
Member

I'm sorry, But in my opinion. pasting images into textareas has been implement in gitea. example:

tmp

Aren't it?

@delvh
Copy link
Member Author

delvh commented Mar 16, 2021

Okay, yes, I can verify that it is partially possible using "Ctrl + V":
It will work if the image was directly added to the clipboard.
However, if the image was simply added as a file link, nothing spectacular will happen, except that the link will be copied as plain text (this however is not necessarily a bug as GitHub has the same behavior when encountering a pasted file).
But, what is not possible is dragging images into a text area.
Although it will appear as if it could be dragged, nothing happens once the dragging gets released.
I'll change the title of the issue accordingly.

@delvh delvh changed the title [Feature Request] Allow copy pasting images into textareas [Feature Request] Allow dragging images into textareas Mar 16, 2021
@tyroneyeh
Copy link
Contributor

This #20263 edit should fix the issue
Demo

Screen.Recording.2022-06-29.at.23.13.18.mov

@anbraten
Copy link
Contributor

duplicate of #14291?

@lunny lunny closed this as completed Jan 16, 2024
@lunny lunny added the issue/duplicate The issue has already been reported. label Jan 16, 2024
Copy link

github-actions bot commented Mar 1, 2024

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

No branches or pull requests

6 participants