Copy & Paste of text with images when source is local and target is not not possible anymore?

Diskutiere Copy & Paste of text with images when source is local and target is not not possible anymore? im Edge & Internet Explorer Forum im Bereich Microsoft Community Fragen; Hi, I'm developing for a customer a simple script for his SharePoint. The point of the script was: The customer copies some text from his local...
  • Copy & Paste of text with images when source is local and target is not not possible anymore? Beitrag #1
M

MSCom

Neuer Benutzer
Threadstarter
Dabei seit
20.09.2016
Beiträge
1
Hi,

I'm developing for a customer a simple script for his SharePoint. The point of the script was: The customer copies some text from his local documents and then pastes it into a rich text field online. As his documents have different formatting and insert without formatting removes images, he wants me to remove all stylings. This was easy and the main problem was that when pasted images within the text would be converted into this data-URL format
and SharePoint didn't like that and deleted the data-block when saving. I converted the data into a blob uploaded it separately and then linked the newly uploaded image. This worked fine until sometime last week.

When I now copy&paste text with images from a local document it just links some local temporary image like this:
clip_image003.jpg


This is the case for all online editors I could think of testing (Gmail, Google Docs, Word Online, SharePoint) and for Chrome, Edge, IE11.

When I look at the paste-event under Chrome I can see that the clipboard-object contains 'text/plain' (my copied text in plaintext) 'text/html' (my copied text as html with the images linked locally like up there) and 'text/rtf' (text as rtf and the images are inside as huge binary blocks in hex).

So the solution was simple, get the images from the rtf, upload them and replace the locally linked images with links to the uploaded versions.

But now I'm stuck for IE. IE's clipboard-object just supports giving me the plaintext nothing else. And If I just let the browser paste he'll just create those locally linked images.

My Questions are:

  • Did the copy&paste behavior change, or is there a setting someone could have messed up?
  • Why aren't local images converted into the base64 Data-URL anymore? (Pasting a single image still does that)
  • Is there anyway to access the pictures in the clipboard from within IE11 via script?
Steps to reproduce:

  1. Create a new text document.
  2. Write "text
    text" in it.
  3. Replace
    with an image you have on your hard drive.
  4. Open any online editor that supports pictures (Word Online, Gmail etc)
  5. Select everything in your local document and copy it (Ctrl + A -> Ctrl + C)
  6. Try to paste it into your online editor.
  7. Result should be "text text" and the should have some "file:\\" src.

Thank you for your time reading,
Daniel Dengler
 
Thema:

Copy & Paste of text with images when source is local and target is not not possible anymore?

Copy & Paste of text with images when source is local and target is not not possible anymore? - Ähnliche Themen

OneNote for Windows won't upload images: Hello! I have a problem with OneNote for Windows 10, whenever I insert a image from the OneNote for Windows 10 app, it fails to sync. However...
Bluetooth audio device not working anymore: What I tried so far: - Restarting audio device - Enabling / Disabling bluetooth - Removing / adding Bluetooth device - Reinstalling bluetooth...
Headset not working fine with Windows: Hi everyone I have in general a problem with my Headsets that are connected to my Headset. I can connect the headset to windows an i can hear...
Strange behavior when using Sharepoint WebDAV: Hello, we are using Explorer View to access files on a SharePoint Online site. More specific a Teams SharePoint site. We are accessing the site...
Cant open some apps being on a standard not local account (no admin rights): I recenltly watched a tutorial on youtube to have a more secure Computer. Before that I only have one account (not local), which had admin...
Oben