10-12-2023, 12:45 PM | #46 |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Okay, I have built a debug version of PageEdit for Windows.
To use this debug version you must set the environment variable: PAGEEDIT_DEBUG_LOGFILE to be the full path to a local debug file on machine (so something ending in "debug.txt"). Then copy from calibre Normal RichText a table of some sort. Then open PageEdit. IMPORTANT NOTE: To do the paste you **must** only use PageEdit"s Edit->Paste menu item as that is the path with the debug information. Once that is done. Please post the resulting "debug.txt" file here so we can see what formats calibre is producing. I have also included debuging info to actually dump the html it is seeing on the clipboard if any exists. Then I have tried adding a workaround to take the info from the clipboard and write it back only as html (with that mimedata type), to see if that approach could be used to workaround the issue. When you get the Message Box about html being present, say No to the request to save as plain text only so it will try the workaround. See the link to PageEdit Windows build in the next post. I hope this will give us enough info to track this one down. Last edited by KevinH; 10-12-2023 at 12:54 PM. |
10-12-2023, 12:50 PM | #47 |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Okay, here is the link to the debug version of PageEdit for Windows.
https://github.com/kevinhendricks/Bu...OnMac/releases You need to download pageedit-installer.zip and unzip it to get the debug PageEdit installer. |
Advert | |
|
10-12-2023, 04:37 PM | #48 |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Please let me know if anyone on Windows that uses Calibre and PageEdit is willing to try the debug version and share the debug log.
Thanks! |
10-12-2023, 05:48 PM | #49 | |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
What's weird is this: If I paste a clip copied from the Normal view of a Rich Text column in calibre 6.28.1 (latest) into MS Word (latest) using the 'Keep source formatting' option I get a table. If I paste the same clip into Page Edit 1.9.10 I get a table. The only situation I don't get a table is if I paste the clip into Page Edit 2.0.0. That suggests the format stripping is happening in PageEdit. Out of curiosity, I copied the table I created in Word into PageEdit, and got a table, when I saved it into Sigil I got an epub with errors, it's in the attached zip. When I view the epub in the calibre viewer I see a table. From a user perspective the only recent change I can recall in calibre's Rich Text editor is the addition of a button to create 'a ref' links to folders. Nothing is making any sense. More to come. BR |
|
10-12-2023, 05:52 PM | #50 |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
10-12-2023, 06:03 PM | #51 | |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Quote:
According to the calibre code, when copying to the clipboard by calibre, it will generate a table and set its mimetype to text/html. Then calibre strips out the table elements replacing them with divs and etc (so still html) but saves it as the mimetype text/plain. All of this seems to be correct afaict. Old PageEdit seems to always use the text/html mimetype data from the clipboard. Newer PageEdit seems to get confused by two mimetype datasets on the clipboard both technically with html and ends up pasting the second one not the first one it finds. I do not know why. There have been very few changes to the QtWebEngine clipboard code for close to a 2 years, and none of those few changes should cause this issue. |
|
10-12-2023, 07:40 PM | #52 |
Grand Sorcerer
Posts: 27,724
Karma: 197390418
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm recalling some mimetype- clipboard-diddling code I was responsible for in either Sigil or PageEdit. At least I think it was one of them. It was long time ago, so if I'm not crazy and it exists, it might work differently starting with Qt6. I just can't recall why it needed to be done, so I'm at a bit of loss where it might be located. Searching on Github's website hasn't been very fruitful.
|
10-12-2023, 08:15 PM | #53 |
Grand Sorcerer
Posts: 27,724
Karma: 197390418
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
@Kevin: I moved the Windows PageEdit CI to Qt6.5.3 and deployed an installer. Just on the off chance that the myriad of Qt fixes from 6.5.2 to 6.5.3 might make a difference?
|
10-12-2023, 08:49 PM | #54 |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
@DiapDealer,
I'll take a peak at all instances of QMimeData in PageEdit and Sigil just to doublecheck. There are not that many. Thanks! Update: I think what you are remembering is here: https://github.com/Sigil-Ebook/Sigil/issues/320 but your fix was correct and limited to Linux, so I do not think this is related to this issue. Last edited by KevinH; 10-12-2023 at 08:57 PM. |
10-12-2023, 09:08 PM | #55 |
Grand Sorcerer
Posts: 27,724
Karma: 197390418
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for finding it! At least we can rule it out.
|
10-13-2023, 12:04 AM | #56 |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
When I did the Edit->Paste I got this popop msg
The details are: Code:
<div> <!--StartFragment--><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>*<!--EndFragment--></p></div> The debug.txt is attached. And looking at its content, I'm reminded that markdown was added as an option to the JobSpy (plugin)->Note Viewer feature fairly recently. In this context a Note is a Rich Text column (like Leonatus's Annotations, or my Blurb columns), but JS-NoteView is more than a Viewer it's an editor too, and it inherits from the baseline calibre Rich Text column editor class. I have a suspicion that markdown support was added to the baseline rich text column class. Calibre 5.44 predates markdown formatted rich text columns. More to come. BR |
10-13-2023, 12:10 AM | #57 | |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I'll repeat my testing on calibre 6.16. Stayed tuned. BR |
|
10-13-2023, 01:18 AM | #58 |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
PageEdit 2.0.2 doesn't like clipboard data from calibre 6.16, ditto 6.15.1, but it's fine with clipboard data from calibre 6.14.1.
The PE popup Show details for clipboard data from calibre 6.16→6.28.1 contains this: Code:
<div> <!--StartFragment--><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>*<!--EndFragment--></p></div> Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css"> p, li { white-space: pre-wrap; } hr { height: 1px; border-width: 0; } li.unchecked::marker { content: "\2610"; } li.checked::marker { content: "\2612"; } </style></head><body> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment-->*</p> <table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0"> <tr> <td bgcolor="transparent"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; 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; -qt-block-indent:0; text-indent:0px; background-color:transparent;"><span style=" font-weight:700;">Hey!</span> 2</p></td> <td bgcolor="transparent"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; 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; -qt-block-indent:0; 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; -qt-block-indent:0; text-indent:0px; background-color:transparent;"><span style=" font-style:italic;">Ta-ta</span> 5</p></td> <td bgcolor="transparent"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:transparent;"><span style=" background-color:transparent;">Duh 6</span></p></td></tr></table> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">*<!--EndFragment--></p></body></html> Watch this space (running out of clichés) BR |
10-13-2023, 01:33 AM | #59 |
null operator (he/him)
Posts: 20,786
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Whew- it's fine, would have been looking for a brick wall had it been otherwise.
The tests with older versions of calibre were done using calibre's portable installs with no optional plugins installed, on the same column (Blurb), in the same book (Test MOBI), in the same library (d:\calibre\libraries\text) Hope this helps. BR |
10-13-2023, 07:45 AM | #60 | |
Sigil Developer
Posts: 7,881
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Unfortunately, although the debug out shows the formats, if you select "No" in that popup it is supposed to dump the html content to that debug txt file.
Would you please try again with "No" and it should dump more. Thanks. Quote:
|
|
|
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 |