Copying/pasting from Scrivener to other programs

When I copy text in Scrivener that has formatting such as italics or underlining and paste it into certain word processors (WordPad, Nota Bene), that formatting is lost. Is this a known issue? Is it fixable? Thanks!

Hm, it looks like it’s taking a plain-text version off the clipboard, but I don’t know why that would be the case. I’ve put it on the list to investigate.

Edited

Thanks! I’m going to raise the question on the Nota Bene forum too.

In the meantime, I have discovered another parameter. I use ClipCache (http://www.xrayz.co.uk/clipcache/) to manage the Windows clipboard, and it identifies material copied from Scrivener as existing in both Unicode Text and HTML formats. The Unicode Text does not show formatting, but the HTML does (in ClipCache). I presume, then, that Nota Bene imports the Unicode version, and not the HTML.

Interestingly, if I copy from Scrivener and paste into MS Word 2010, then copy from Word and paste into Nota Bene, the formatting comes through fine. ClipCache identifies the text copied from Word as being in Rich Text and HTML, and the Rich Text has the formatting (as does the HTML). I do know that Nota Bene imports RTF, so I presume that explains why the formatting comes through when copied from Word.

There may be nothing to be done about this, and it’s not a huge hassle, but I thought it worth reporting.

Did anyone ever figure out a way to preserve bold and italics when copying from Scrivener? This is actually causing a big problem for me.

I write multi-part, thousands-word long things that I then post to Tumblr. The easiest way to do this would be to just copy and paste it, and if I copy from a program like Open Office, Tumblr detects the bold and italics fine. But when I copy from Scrivener, I lose the formatting entirely.

I have tried copying the basic HTML from Scrivener, but this is a hassle because instead of using italics and bold tags, Scrivener uses span tags. Tumblr strips those down to merely “span” so I still lose the formatting. Scrivener also shoves a bunch of formatting data I don’t want and can’t have in the “p” tags, and font data into other tags even though my font is constant in the document and I don’t want to specify a font in the HTML.

Am I really going to have to do several tedious find-replaces on the HTML data to simply post something I should be able to copy and paste as-is? Is there are least somewhere I can customize the Copy HTML feature? I am really not looking forward to going over the code of an 80k word piece to make sure everything is as it should be.

I am using Windows 8.

I’m not a Windows user, but if it works from Word/OpenOffice, isn’t it possible for you to compile to Word or RTF and then copy and paste from Word/OO? Would save having to do find & replace, yes?

Scrivener includes the RTF formatting in the clipboard data, so it’s up to the individual program selecting which clipboard format to take. Copying and pasting into Word, for instance, you’ll see that the bold and italic is preserved. We do have a ticket open for further investigation on why some of these programs aren’t taking the correct format, or are stripping the formatting, but in the meanwhile try just copying and pasting to OpenOffice Writer or Word and then re-copying and pasting from there.

Thank you so much for the workaround! C&Ping to Open Office, then C&Ping that to Tumblr, works great! Saves me a lot of work.

Thanks, MM and nattiecakes, that Open Office (or LibreOffice) technique will be most helpful. I’ve been contending with a similar issue, and now have a fair sense of what’s going on.

When you post a comment on a WordPress blog, it is expected in plain text, with certain HTML tags permitted: a href; abbr; acronym; b; blockquote; cite; code; del; em; i; q; strike; strong.

Thus you can write your text in Scrivener with bolds, underlines and links, paste it into an HTML editor such as Kompozer, and use the Source tab to view the underlying HTML code, for pasting into the WordPress box. Whereupon you’ll see that Scrivener generates formatting in SPAN tags, unrecognized in the box:

<span style="font-family: 'Cambria'; font-size: 14pt; font-weight: 600;">bold txt</span>

My first approach was to use Kompozer to remove Scrivener formatting, and then immediately replicate it via Kompozer’s interface. Alas, Kompozer initially generated renditions of the formatting that were also not useful in WordPress.

Fortunately Kompozer has a Preferences for markup under Advanced Settings. It’s the HTML4 Document Type Definition. Set DTD to Strict and Kompozer will format with SPAN tags. Set it to Transitional, and Kompozer will generate the human-friendly retro tags such as i, b and font.

Until this evening I’d been going through the posting text, and manually removing and replicating Scrivener’s formatting in Kompozer, in its Transitional DTD setting, to generate source to paste into WordPress.

That all changes now. It’s easy to see, if you paste from Scrivener into Open Office or LibreOffice, and then on into Kompozer, that LibreOffice generates the retro “Transitional” i, b and font tags, rather than SPAN. I’ll still need Kompozer to dig out the HTML source for WordPress, but it’ll require little if any manual tinkering. :smiling_face:

Unless the framework has a setting, I doubt there will be any good way for Scrivener’s editor to support multiple HTML standards when pasting out. It would just mess something else up. Perhaps an auxiliary conversion tool would do the job. But it’s probably best just to inform users of the issue in documentation, and outline the recommended steps and applications to alter the generated clipboard HTML.

Rgds — Jerome