On Mon, Jul 8, 2013 at 4:10 PM, Georg Baum <georg.b...@post.rwth-aachen.de> wrote:
> Does this work for you? What about the garbled text which you posted > earlier? Hi Georg, This has come back for me with Qt 5 (5.2.1 on Ubuntu 14.04). If I go to www.google.com in Chromium and right-click on the Google icon and select "Copy image" and then do a normal paste in LyX, I get the following: %00G%00o%00o%00g%00l%00e If I do the same in Firefox, it works as I expect and tries to paste the image. 'paste png' works after copying in Chromium. The difference appears to be that after copying in Chromium I have the following MIME types: text/html <meta http-equiv="content-type" content="text/html; charset=utf-8"><img src="https://www.google.com/images/srpr/logo11w.png" alt="Google"/> text/uri-list https://www.google.com/images/srpr/logo11w.png where with Firefox I also have text/html but with a content of: <img alt="Google" id="hplogo" src="https://www.google.com/images/srpr/logo11w.png" style="padding-top:112px" onload="window.lol&&lol()" height="95" width="269"> If I remove the text/html MIME type, LyX then pastes https://www.google.com/images/srpr/logo11w.png which is the contents of text/uri-list If I remove text/uri-list then the picture is pasted. >From what I understand, LyX asks Qt to convert HTML to a QString in tidyHtml(). If that string is empty, then it moves to a different MIME type. Perhaps the HTML conversion has changed in Qt 5 versus Qt 4? I'm not sure how the treatment of text/uri-list has changed. Note that this isn't annoying to me personally. But is this something we want to try to fix? Or do you think that trying to make this sort of paste work with all browsers and all the ways that MIME types are set is an impossible goal? Scott