Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2017, 09:13 AM   #1
ChipSuey
Member
ChipSuey began at the beginning.
 
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!
ChipSuey is offline   Reply With Quote
Old 02-27-2017, 10:00 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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?
kovidgoyal is offline   Reply With Quote
Advert
Old 02-27-2017, 10:05 AM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
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
phossler is offline   Reply With Quote
Old 02-27-2017, 10:09 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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
kovidgoyal is offline   Reply With Quote
Old 02-27-2017, 10:11 AM   #5
ChipSuey
Member
ChipSuey began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
Quote:
Originally Posted by kovidgoyal View Post
How exactly are you pasting? With a keyboard shortcut/paste button/something else? What OS?
Sorry, forgot to mention any of that-

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.
ChipSuey is offline   Reply With Quote
Advert
Old 02-27-2017, 10:17 AM   #6
ChipSuey
Member
ChipSuey began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2016
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Is this going to be published in the next update? I'm just not sure how to fix the code myself, and I can certainly wait for a new version to update (if there's a link I can use to download a new version from there, I'm happy to- just never used GitHub for anything).
ChipSuey is offline   Reply With Quote
Old 02-27-2017, 10:26 AM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
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
PeterT is offline   Reply With Quote
Old 02-27-2017, 04:20 PM   #8
Thom*
The Fumbler
Thom* began at the beginning.
 
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.
Thom* is offline   Reply With Quote
Old 02-28-2017, 08:11 AM   #9
ChipSuey
Member
ChipSuey began at the beginning.
 
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!
ChipSuey is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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 PDF 2 09-03-2010 04:12 AM
PDF to text/html? utrost Sony Reader 9 06-22-2007 03:19 PM


All times are GMT -4. The time now is 10:26 AM.


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