![]() |
#1 |
Member
![]() Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
|
Text pasting as HTML?
Hi! Since updating to v 2.80, I've noticed that any time I paste in either text or HTML into the editor, it's coming up as HTML, or I'm getting an error that there's no valid text - for example, I have a snippet of code I like to plug into my TOC's in order to remove the standard blue/underlined text. Up until last week, I simply had that living in my notes app, would copy and paste the code, and move on with my work.
Now when I try that, it pastes an entire HTML page, from <html> to </html>. Copy/pasting from a Word doc is giving me the error that follow: AttributeError:'NoneType' object has no attribute 'isValid' I don't know what that means, but I'd like to be able to copy/paste properly again. I'm not seeing a "paste as HTML" feature in the editor prefs. Is there something I'm missing? Thanks for any help with this! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
How exactly are you pasting? With a keyboard shortcut/paste button/something else? What OS?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Not an answer to pasting, but for inline TOC's I have a 'override' CSS file in
C:\Users\<userid>\AppData\Roaming\calibre\resource s\templates\inline_toc_styles.css that gets used instead of the default Took a little tweaking since I'm not so hot with CSS but it does format inline TOCs the way I wanted without having to paste in CSS code |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This should take care of it https://github.com/kovidgoyal/calibr...072597752885ac
|
![]() |
![]() |
![]() |
#5 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
|
Quote:
I'm on Mac OS 10.10.5 Pasting from just the default notes app gets a whole bunch of HTML, even for just a couple of sentences. Pasting from Word or Text Edit gives me the error I mentioned previously. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,511
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Anytime Kovid posts a link to GitHub it means the fix will be in the next release
|
![]() |
![]() |
![]() |
#8 |
The Fumbler
![]() Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
|
Make sure you are selecting text and pasting it. Do not select a text file and try to paste that.
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
|
Thanks for the help everyone - looks like this will be addressed in the next Calibre update (Kovid has published a fix on github).
Thanks again! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML input plugin stripping text within toc tags in child html file | nimblebooks | Conversion | 3 | 02-21-2012 03:24 PM |
Content copying and pasting text | beppe | Amazon Kindle | 12 | 07-24-2011 03:09 PM |
Troubleshooting HTML code in text files | LeoBloom | Amazon Kindle | 1 | 12-12-2010 02:25 PM |
PDF to HTML jumbled text | jeero | 2 | 09-03-2010 04:12 AM | |
PDF to text/html? | utrost | Sony Reader | 9 | 06-22-2007 03:19 PM |