Handle paste event on the web interface to allow pasting files directly into the browser #54

Open
opened 2020-05-15 12:00:59 +02:00 by minnozz · 1 comment
Collaborator

As suggested by Thom.

See https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event

How should this interact with pasting a link or text into one of the form fields?

As suggested by Thom. See https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event How should this interact with pasting a link or text into one of the form fields?
electricdusk added the
feature
label 2020-05-15 12:09:25 +02:00
Owner

I think the most beautiful support would be to allow pasting, and depending on the paste content, emit some kind of in-browser view of what was pasted. Then the user can submit that, or maybe even edit that before submitting.

For example:

  • When somebody pastes an image, show the image and a submit option.
  • When somebody pastes plain text, spawn a <textarea> with the pasted text as innerText. (And a submit button.)
  • Otherwise, show something like binary file of 42kB.
I think the most beautiful support would be to allow pasting, and depending on the paste content, emit some kind of in-browser view of what was pasted. Then the user can submit that, or maybe even edit that before submitting. For example: - When somebody pastes an image, show the image and a submit option. - When somebody pastes plain text, spawn a `<textarea>` with the pasted text as `innerText`. (And a submit button.) - Otherwise, show something like `binary file of 42kB`.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: electricdusk/rushlink#54
No description provided.