Mobileread
Calibre Changing My HTML
#1  DragonflySuz 03-21-2020, 02:52 AM
Ever since one of Calibre's updates sometime last year, Calibre keeps changing the HTML in my book details. It happens immediately when I open the edit metadata window. I use very basic HTML that's easy for me to read at a glance. I've cleared the Text Styling on Look & Feel Book Detail tab but that didn't solve the problem. Attached images show what I want and what Calibre does.

What I use & how I want it spaced:
<div><b>Size:</b>
<br><br><b>Characters:</b> &diams;&diams; &bull;
<br><b>Places:</b>
<br><br><b>Description:</b>
<p style="text-indent: 15px; margin:0px"></p>

<ul style="margin-left:-25px">
<li><a href="">Goodreads</a></li>
<li><a href="">Smashwords</a></li>
</ul><br><br></div>

Calibre's changes & how it runs all the HTML together:
<div>
<p><strong>Size:</strong> <br><br><strong>Characters:</strong> ♦♦ • <br><strong>Places:</strong> <br><br><strong>Description:</strong> </p>
<ul><li style="text-indent: 0px; margin-right: 0px; margin-top: 12px; margin-left: -25px; margin-bottom: 0px">Goodreads</li>
<li style="text-indent: 0px; margin-right: 0px; margin-top: 0px; margin-left: -25px; margin-bottom: 12px">Smashwords</li></ul>
<p><br><br></p></div>

How do I stop Calibre from doing this?
My Look.JPG Calibre Look.JPG 
Reply 

#2  kovidgoyal 03-21-2020, 05:35 AM
You dont. Its not calibre doing this, its Qt's Text Edit widget.
Reply 

#3  theducks 03-21-2020, 10:04 AM
I find it odd that neither of your screen captures show the Bull, but it shows in the alternate code (where entity codes are changed to the character)

Code
<b>Characters:</b> &diams;&diams; &bull; 
Reply 

#4  DragonflySuz 03-21-2020, 02:05 PM
Quote theducks
I find it odd that neither of your screen captures show the Bull, but it shows in the alternate code (where entity codes are changed to the character)

Code
<b>Characters:</b> &diams;&diams; &bull; 
Sorry about the confusion on bullet points. The screenshot html did not include them.

Quote kovidgoyal
You dont. Its not calibre doing this, its Qt's Text Edit widget.
I'm way out of my element here so I'm going to expose my ignorance therefore please excuse my very minimal understanding of how widgets, plugins, etc work together. Is there another text editor I can use that won't change HTML?

Another problem that occurred at the same time as my other issues is that the links no longer work in the "normal view" when editing metadata. Can I assume this change is also due to Qt's text edit widget?
Reply 

#5  BetterRed 03-21-2020, 03:23 PM
Links work fine if you put a uri in the code, see ==>> HTML a tag

Try the Link tool:

show attachment »

BR
Reply 

#6  DragonflySuz 03-21-2020, 04:33 PM
Quote BetterRed
Links work fine if you put a uri in the code, see ==>> HTML a tag

Try the Link tool:

show attachment »

BR
Thanks for the suggestion BetterRed. I tried the link tool as you suggested but it didn't work. All my links do work when clicked on in the Book Detail window just not in the Edit Metadata normal view.
Reply 

#7  BetterRed 03-21-2020, 05:41 PM
Quote DragonflySuz
Thanks for the suggestion BetterRed. I tried the link tool as you suggested but it didn't work. All my links do work when clicked on in the Book Detail window just not in the Edit Metadata normal view.
Ah-ha you're right, they don't work for me in the Comments Editor either (same code, but used from book list). I don't normally click them in the Editor.

This might be another consequence of QT-webengine (part of calibre 4), hopefully Kovid can do another workaround Ψ³

BR
Reply 

#8  kovidgoyal 03-21-2020, 10:42 PM
No there is not another widget, I'm afraid. And links will work everywhere else, just not in the editor widget (for technical reasons).
Reply 

#9  DragonflySuz 05-27-2020, 02:24 AM
Quote kovidgoyal
No there is not another widget, I'm afraid. And links will work everywhere else, just not in the editor widget (for technical reasons).
Showing my ignorance again. Aaaargh! Wish I understood more.

Is it possible to turn off/not use the editor widget? Or is it too integral? Is there help s

Or what version Calibre would I have to install to go back to how the editor was before? And if I go back too far, do I lose the "edit book"?
Reply 

Today's Posts | Search this Thread | Login | Register