10-10-2023, 10:27 AM | #16 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
FWIW ... Some shortcuts are system controlled and therefore skip the normal path used for copying and pasting. I see this on macOS often.
|
10-10-2023, 10:48 AM | #17 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
But I also tried the regular way (right click->insert) with the same effect.
|
Advert | |
|
10-10-2023, 12:10 PM | #18 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay, I tested this on macOS and had no problems pasting in rich text to PageEdit using the Edit->Paste menu (and with shortcuts).
The key was where I copied from to load the clipboard. If I copied inside CodeView, it would only paste it as plain text. But that makes sense as CodeView is not a rich text editor and only assigns a plain text mimetype to the clipboard contents. If I copied it from Preview or any browser that I tried (Safari, Chrome, Firefox, etc) and tried to paste it into PageEdit, then it always asked if I wanted to paste as plain text and saying No, it pasted in the rich text just fine. So this is controlled by the source of where you copy the rich text from as it assigns the mimetypes for the copied text on the clipboard. Hope this helps. |
10-10-2023, 12:56 PM | #19 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
10-10-2023, 01:11 PM | #20 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
I've just tested this on my Windows 11 machine with PageEdit 2.0.1.
When I selected formatted text on a website, copied it to the clipboard and then pasted it into PageEdit, the formatting was kept. I don't use Calibre annotations, but when I copied regular Calibre metadata with bold text in it, the formatting was also kept when I pasted it into PageEdit. |
Advert | |
|
10-10-2023, 04:15 PM | #21 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
As I said, at last, the text was pasted in PageEdit as formatted paragraphs (in italics). What was still missing, was the table format, and here I recall what Becky said. Perhaps this is suppressed by intention.
|
10-10-2023, 05:56 PM | #22 |
null operator (he/him)
Posts: 20,576
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
AFAIK: the calibre Rich Text editor (aka Comments, or Long text) doesn't include support for tables - i.e. there is no is button for it, and it's not in its Styles dropdown, my guess is that it's not supported by Qt's rich text editor.
The Calibre->Annotations plugin copies the text from the device to Comments or a designated custom column (that's as much as I know about it). BR Last edited by BetterRed; 10-10-2023 at 06:09 PM. Reason: clarity |
10-10-2023, 06:43 PM | #23 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
According to Qt6,
https://doc.qt.io/qt-6/richtext-html-subset.html It says it does recognize html table elements. I have no idea why when you copy a table from Calibre and paste it into PageEdit the table markup does not get pasted. According to that link, tables are supported. |
10-11-2023, 03:07 AM | #24 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
I have to add that, when I had not yet checked the "Use prettify to reformat xhtml when saving"-box in the settings, there was no formatting at all. Only then the text appeared in paragraphs and in italics.
And I tried copy/pasting by using Edit->insert, and there, the reported prompt concerning the HTML-formatting opened indeed. I think I'll stay with the previous version, as long as this issue is not clarified. |
10-11-2023, 11:51 AM | #25 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
It would be interesting if you copy from Calibre and paste into Word or LibreOffice or something to see if the table html tags are actually on the clipboard.
If they are not, there is no way to "fix" this from our end. It is just a difference between Qt5 and Qt6 on Windows. |
10-11-2023, 03:11 PM | #26 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
To try to test support for pasting tables in PageEdit, I created a simple table in xhtml in Sigil and as long as I was careful to select the entire table in Sigil's Preview (started above the table and continued a bit past) and hit copy, I could go to PageEdit and paste and sure enough the Inspector showed that the entire table was copied.
If I just grabbed part of the table (just the contents of the rows) then when I pasted into PageEdit I just got rich text in paragraphs with no table. So whatver you are seeing on Windows, I am not able to recreate at all on macOS. So Qt6 vs Qt5 does not change anything here. So would you please try selecting the line above the table through to the line after the table (to make sure the entire table is selected and not just the contents of the rows themselves) and try pasting it into PageEdit, then try using PageEdit's Inspector to see the actual code pasted to verify if a table was formed or not? With the current PageEdit on macOS, I do indeed get a table if I make sure to select the whole table. Perhaps this is just an issue on Windows? Here is the snippet of table xhtml I used. Notice the use of bold and italics for the second column values. Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <title></title> </head> <body> <p>*</p> <table> <tbody> <tr><td>Hello 1</td><td><b>Hey!</b> 2</td><td>Hi 3</td></tr> <tr><td>Bye 4</td><td><i>Ta-ta</i> 5</td><td>Duh 6</td></tr> </tbody> </table> <p>*</p> </body> </html> Last edited by KevinH; 10-11-2023 at 03:25 PM. |
10-11-2023, 04:38 PM | #27 |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I tried your snippet on Windows 11 and it looked good. I've added an image of the inspected code in PageEdit after the copy/paste.
Last edited by DNSB; 10-11-2023 at 04:55 PM. |
10-11-2023, 04:50 PM | #28 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
Thank you for testing and reporting back. I have no idea how Calibre's metadata that represent annotations is laid out on Windows. But if it uses tables and the entire table is selected, this tests shows you should be able to copy and paste them into current PageEdit with no issues. |
|
10-11-2023, 07:06 PM | #29 |
null operator (he/him)
Posts: 20,576
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Windows 10 (up to date)
Calibre 6.18.1 (latest) Sigil 2.0.1 (Qt 6.5.2) Page Edit 1.9.10 and 2.0.0 @KevinH - firstly, the calibre Rich Text (aka Long Text and Comments) column editor does support tables, what it lacks is a widget to create one - i.e. one of these: I pasted the body of your table into the HTML view of a calibre Rich Text column: I then copied the Normal View into the clipboard I pasted that into Page Edit 1.9.10 Which resulted in this in Sigil 2.0.1 I then installed Page Edit 2.0.0, and pasted the same clip from Calibre into it Which resulted in this in Sigil 2.0.1 This is the HTML of the Rich Text column I'm pasting into PE, Code:
<div> <p>*</p> <table border="0" cellspacing="2" cellpadding="0"> <tbody><tr> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><span style="background-color: transparent">Hello 1</span></p></td> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><strong>Hey!</strong> 2</p></td> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><span style="background-color: transparent">Hi 3</span></p></td></tr> <tr> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><span style="background-color: transparent">Bye 4</span></p></td> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><em>Ta-ta</em> 5</p></td> <td bgcolor="transparent"> <p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent"><span style="background-color: transparent">Duh 6</span></p></td></tr></tbody></table> <p>*</p></div> Question is - why does it work in PE 1.9.10 and not in PE 2.0.0 BR |
10-11-2023, 09:09 PM | #30 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
No idea.
The only big difference except for inline styles is that the calibre version wraps the enire table in a div. If you get a table copied into the clipboard, my tests show you can paste it into PageEdit (latest version) just fine. DNSB showed the same result with a table pasted into PageEdit with Windows 11. So could this be a Windows 10 vs Windows 11 thing? I will try with exactly your xhtml (div and all) and try copying it in Sigil Preview and pasting it into PageEdit to see what happens. Last edited by KevinH; 10-11-2023 at 09:14 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PageEdit-1.7.0 Released | DiapDealer | Sigil | 1 | 07-22-2021 11:44 AM |
PageEdit-1.5.0 Released | DiapDealer | Sigil | 1 | 03-19-2021 10:59 AM |
PageEdit-1.3.0 Released | DiapDealer | Sigil | 26 | 08-19-2020 04:22 PM |
PageEdit-1.2.0 Released | DiapDealer | Sigil | 13 | 04-02-2020 04:16 AM |
PageEdit-0.9.6 Released | DiapDealer | Sigil | 22 | 01-30-2020 09:00 PM |