openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Enhancement: sap.ui.codeeditor.CodeEditor: Paste images and upload them

Open wernerdaehn opened this issue 1 year ago • 2 comments

OpenUI5 version: 1.108.12

Steps to reproduce the problem:

  1. Configure the CodeEditor to type markdown or html
  2. Make a screenshot in Windows
  3. Paste the image into the editor with ctrl-v

What is the expected result? If you do the same here in Github, the screenshot gets uploaded and the img tag inserted. Would be good to have the same option. Suggestion 1: Control should expose a paste event to add custom logic. Suggestion 2: User can attach a function that is called when an image is pasted. This function returns the text to insert at the current cursor and contains the file upload to the backend server.

What happens instead? Paste is ignored and not exposed to catch it. Currently when using the code editor as markdown editor and you want to add a screenshot, you have to make a screenshot, save it as file, provide an upload functionality for the file, copy the URL where the file resides, edit the path to make it relative to the editor URL, go back to the code editor and write the img tag using the file location.

wernerdaehn avatar May 28 '23 10:05 wernerdaehn

Hello @wernerdaehn , Thank you for sharing your enhancement proposal. I've created an internal incident 2380054151. The status of the issue will be updated here in GitHub. Regards, Petya Markova. (UI5 Dispatcher)

PetyaMarkovaBogdanova avatar May 29 '23 08:05 PetyaMarkovaBogdanova

Hello,

We plan to implement this feature with internal backlog item FIORITECHP1-27357.

Best regards, Petar

dimovpetar avatar Jun 15 '23 11:06 dimovpetar