-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Context:
A signed-in user should be able to upload an image and then paste it into the editor to view within the document or by opening a link in a separate tab.
Definition of Done:
-
User authentication is mandatory.
-
A visible button is displayed only when authorized:
-
Hovering over the button reveals a tooltip titled "Upload Image."
-
Clicking the button triggers a native file picker window, allowing selection of only "png, jpg, jpeg, gif" files.
-
The maximum file size for uploads is 4 Megabytes.
-
Only images in png, jpg, gif, or jpeg format are accepted.
-
Only one image can be uploaded at a time.
-
Upon successful upload, a confirmation badge appears at the top:
-
Once completed, a modal confirms the upload:
-
Users can copy the image link to be pasted into the creator for display.
-
Clicking a designated button displays the following badge:
-
The modal can be closed using the "X" button.
-
Error handling: When errors occur, a modal with a message explains the problem:
-
The error modal can be closed.
-
If attempting to bypass file filters (e.g., uploading a PDF), the error modal is displayed.
-
For invalid sizes (over 4 megabytes), an error is shown.
-
Clicking the "Copy" button generates unique text content with a link, allowing the image to be previewed after pasting it into the editor.
-
When pasting the generated link into a new tab, the image is displayed.
-
Functionality extends to mobile devices, adapting the file picker control to native mobile interfaces based on the device used.
-
Compatible with iPhone 12 and any other Android-based mobile device.
Metadata
Metadata
Assignees
Labels
Projects
Status