10-01-2017, 12:24 PM | #1 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
Can't paste rich text on Linux
Actually I see that Sigil does not paste from clipboard rich text, but only plain text.
Sometimes it could be useful can paste also rich text. Someone can do it? Thank you |
10-01-2017, 12:36 PM | #2 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
Advert | |
|
10-01-2017, 02:09 PM | #3 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
|
10-01-2017, 05:38 PM | #4 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
I was able to reproduce this issue with elementary OS (Ubuntu) and Sigil 0.9.8 and Arch Linux with Sigil 0.9.8 (built from source with all commits up to 09/12/2017).
(Pasting formatted text from the Preview window worked.) |
10-01-2017, 05:44 PM | #5 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
FWIW - This was not an intended change. My guess is this is either related to Linux clipboard changes external to Sigil or maybe related to the Sigil code that forces Linux to take ownership of external clipboard contents to prevent the Qt Linux bug with slow highlighting when external clipboards contents are owned by other applications.
Last edited by KevinH; 10-01-2017 at 05:47 PM. |
Advert | |
|
10-01-2017, 05:46 PM | #6 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
What are the programs you're pasting from?
|
10-01-2017, 05:50 PM | #7 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
10-01-2017, 05:58 PM | #8 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I can duplicate it. I'll have to check if it's one of our commits or something else.
|
10-02-2017, 08:40 AM | #9 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Another oddity with this is that even though the copied rich text shows up in Sigil's "Paste from Clipboard History" feature (obviously not in the rich text format), it cannot be pasted into Book View at all. Nothing happens. It can still be pasted as plain text into Code view, though. Weird.
I'm experiencing it clear back to 0.9.5 (the most recent Ubuntu 16.04 repo version). So either it's something that happened a long time ago that nobody's reported, or some recent change in the Linux desktop (X11, gnome. gtk, etc...) has broken our QClipboard work-around. The workaround for slow selection on Linux was implemented in v0.9.3, so it's possible we just broke it then, I guess. Just seems odd that no one reported it until now if so (though it probably isn't that popular of a feature to begin with). |
10-02-2017, 08:44 AM | #10 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If things work as expected in v0.9.2 (albeit very slowly) we should have our answer. Should be able to find some time to test that soon.
EDIT: I'm moving this thread into the main Sigil forum. A plugin for pasting anything into one of Sigil's editable views isn't really very feasible. This is simply a bug we should be able to (hopefully) fix. Last edited by DiapDealer; 10-02-2017 at 11:57 AM. |
10-02-2017, 02:21 PM | #11 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Confirmed that pasting rich text (from external sources) into Book View before version 0.9.3 works as expected. At least we have a good idea where to look.
I've entered a new issue into Sigil's issue database for tracking purposes. https://github.com/Sigil-Ebook/Sigil/issues/320 |
10-02-2017, 05:01 PM | #12 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've got a solution utilizing QMimeData that seems to restore the ability to paste rich text from external programs into Book View (and not trigger the text-selection-slowdown that made us create this workaround in the first place).
You still can't paste the data using the Paste from Clipboard History feature into Book View, but I'm not entirely certain that ever worked with rich text to be perfectly honest. From what I see of the code, I suspect not. Last edited by DiapDealer; 10-02-2017 at 06:06 PM. |
10-02-2017, 09:35 PM | #13 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Please push it! Great Work.
|
10-02-2017, 10:44 PM | #14 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
10-03-2017, 01:40 AM | #15 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@duns: DiapDealer's commit fixed the issue. If you don't want to wait for the Sigil 0.9.9 release, you can build a fixed version yourself using DiapDealer's fool-proof Linux build instructions.
|
Tags |
paste, plain text, rich text |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to paste as plain-text in Sigil? | elenderg | Sigil | 4 | 09-28-2016 05:27 PM |
How to Copy & Paste text from Chinese text PDF? | E-Books | 4 | 08-09-2014 09:22 AM | |
Troubleshooting Paste wifi password into text file? | garyyoung | Amazon Kindle | 9 | 07-08-2014 12:15 AM |
Copy/Paste from Viewer (Linux) | lbeckm3 | Library Management | 5 | 04-29-2013 11:02 PM |
PRS-T2 Howto copy and paste text?! | JoelH | Sony Reader | 2 | 02-02-2013 02:33 AM |