I’ve been using Scrivener for the last year or so and have been copy/pasting into websites (i.e. reddit, tumblr, AO3) with all formatting preserved, and I’ve just made the switch to Firefox and have found that it takes the formatting (paragraph breaks, italics) out. I asked and was linked to this, which does seem to be exactly the issue, but the fix listed is for Windows, and I can’t seem to find an equivalent setting for Mac. Does it exist? I can see the ‘inline CSS’ setting, but not the ‘write html clipboard data’ checkbox.
I’m aware of the other work arounds (copy and paste into another program such as LibreOffice or Word, or go back to using Chrome for that specific purpose), which are fine, but not ideal, so I thought I’d ask if anyone else on Mac has had this issue and found a way to change the setting in Scrivener. Thanks!
Particularly with google docs. I either eneded up pasting plain text, or I ended up pasting the html format of the plain text IN HTML – the code.
#!/bin/bash
osascript -e ‘set theData to (the clipboard as «class RTF »)’
-e ‘set fileRef to open for access (POSIX file “/tmp/scriv.rtf”) with write permission’
-e ‘set eof fileRef to 0’
-e ‘write theData to fileRef as «class RTF »’
-e ‘close access fileRef’
textutil -convert html /tmp/scriv.rtf -output /tmp/scriv.html
osascript -e ‘set the clipboard to (read (POSIX file “/tmp/scriv.html”) as «class HTML»)’
The above script named scriv2html is what I use.
Copy in scrivener.
run the script in a terminal window. since I store it in ~/bin, I run it as ~/bin/scriv2html
Then switch to the place where I need it, and hit ‘command-V’ to paste.
If it works when using another browser, then at least you know Scrivener is doing its job of putting the requisite information on your clipboard.
It seems your problem is with Paste in Firefox which knows about the sort of web field you are in and whether it takes rich text, and pulls from the relevant type on the clipboard accordingly. Only it seems not to be doing that. I wonder why.
I’m not a coding person, but what seems to be happening:
Scrivener copies to the clipboard in some way that isn’t what most other programs do
Firefox pastes from the clipboard in a way that doesn’t see Scrivener’s formatting.
Scrivener for Windows seems to have an option in the menu which changes how Scrivener copies to the clipboard, which DOES make it work with Firefox. Scrivener for Mac doesn’t seem to have the same option.
It’s really weird because I can copy/paste from scrivener into other programs (e.g LibreOffice) without issue, and I can paste from other programs (e.g. LibreOffice) into Firefox without issue. It’s the very specific Scrivener→Firefox incompatibility that’s the issue. And obviously there are workarounds, it’s just an odd thing to have encountered.
I’d phrase it more like: Scrivener copies formatted text the same way all native macOS software, using Apple’s development toolkits, do. It may be, for you, that you tend to use a high proportion of ported software instead (Firefox, Word, Adobe, LibreOffice, Electronware, etc.), giving you the impression that Scrivener is the strange one.
Another factor is the website itself. The browser may be interpreting the full clipboard and passing it along to the website, but if the site isn’t programmed to understand a stock Mac formatted clipboard then obviously it won’t work.
In fact we do not have much of any code that is involved in the gritty mechanics of putting text variants onto the clipboard, at that level.