Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-10-2023, 10:27 AM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-10-2023, 10:48 AM   #17
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
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.
Leonatus is offline   Reply With Quote
Advert
Old 10-10-2023, 12:10 PM   #18
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-10-2023, 12:56 PM   #19
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Leonatus View Post
But I also tried the regular way (right click->insert) with the same effect.
Try with the Sigil main menu: Edit->Paste
DiapDealer is offline   Reply With Quote
Old 10-10-2023, 01:11 PM   #20
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
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.
Doitsu is offline   Reply With Quote
Advert
Old 10-10-2023, 04:15 PM   #21
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
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.
Leonatus is offline   Reply With Quote
Old 10-10-2023, 05:56 PM   #22
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is online now   Reply With Quote
Old 10-10-2023, 06:43 PM   #23
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-11-2023, 03:07 AM   #24
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
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.
Leonatus is offline   Reply With Quote
Old 10-11-2023, 11:51 AM   #25
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-11-2023, 03:11 PM   #26
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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>
Would someone with Sigil and PageEdit on Windows please run that test and confirm if there is a Window's specific problem we need to address?

Last edited by KevinH; 10-11-2023 at 03:25 PM.
KevinH is offline   Reply With Quote
Old 10-11-2023, 04:38 PM   #27
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
Attached Thumbnails
Click image for larger version

Name:	PageEdit_inspect.png
Views:	32
Size:	44.6 KB
ID:	204226  

Last edited by DNSB; 10-11-2023 at 04:55 PM.
DNSB is offline   Reply With Quote
Old 10-11-2023, 04:50 PM   #28
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
I tried your snipped on Windows 11 and it looked good. I've added an image of the inspected code in PageEdit after the copy/paste.
Great! So Windows 11 does work to paste tables into PageEdit as long as the source of the copy uses tables and the entire table is selected.

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.
KevinH is offline   Reply With Quote
Old 10-11-2023, 07:06 PM   #29
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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:

Click image for larger version

Name:	table widget.jpg
Views:	27
Size:	32.7 KB
ID:	204235

I pasted the body of your table into the HTML view of a calibre Rich Text column:

Click image for larger version

Name:	1.jpg
Views:	27
Size:	61.5 KB
ID:	204236

I then copied the Normal View into the clipboard

Click image for larger version

Name:	2.jpg
Views:	31
Size:	58.8 KB
ID:	204238

I pasted that into Page Edit 1.9.10

Click image for larger version

Name:	3 PE 1.9.10.jpg
Views:	33
Size:	100.0 KB
ID:	204239

Which resulted in this in Sigil 2.0.1

Click image for larger version

Name:	4 After PE 1.9.10.jpg
Views:	31
Size:	312.0 KB
ID:	204240

I then installed Page Edit 2.0.0, and pasted the same clip from Calibre into it

Click image for larger version

Name:	5 PE 2.0.0.jpg
Views:	28
Size:	65.3 KB
ID:	204241

Which resulted in this in Sigil 2.0.1

Click image for larger version

Name:	6 After PE 2.0.0.jpg
Views:	35
Size:	207.6 KB
ID:	204242

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>
The transformation from what I pasted originally was done by the calibre Rich Text Editor.

Question is - why does it work in PE 1.9.10 and not in PE 2.0.0

BR
BetterRed is online now   Reply With Quote
Old 10-11-2023, 09:09 PM   #30
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 05:15 PM.


MobileRead.com is a privately owned, operated and funded community.