SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

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

Open wernerdaehn opened 1 year ago

wernerdaehn commented 1 year ago

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.

PetyaMarkovaBogdanova commented 1 year ago

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)

dimovpetar commented 1 year ago

Hello,

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

Best regards, Petar