When pasting from Google docs, text is bold and ctrl + shift + v does not work on 2.1

Ricardo B. dos Reis's Avatar

Ricardo B. dos Reis

13 Jan, 2020 08:13 PM

Hi, I kept using the previous version of anki because on 2.1 whenever i am pasting from google docs my text becomes bold and +shift does nothing. The text i am copying from is not bold.
any ideas on why and how to solve it without third party programs?

  1. Support Staff 1 Posted by Damien Elmes on 14 Jan, 2020 05:29 AM

    Damien Elmes's Avatar

    Do you get the same behaviour using 2.1.17? Please note you don't need the shift key with .17.

  2. 2 Posted by Ricardo B. dos ... on 14 Jan, 2020 12:13 PM

    Ricardo B. dos Reis's Avatar

    Yes sir
    I meant 2.1 as in the newest version

  3. Support Staff 3 Posted by Damien Elmes on 14 Jan, 2020 09:45 PM

    Damien Elmes's Avatar

    Please double check, as you appear to be syncing with .15.

  4. 4 Posted by Ricardo B. dos ... on 15 Jan, 2020 12:34 PM

    Ricardo B. dos Reis's Avatar

    Hi,
    I downloaded again from the website just to be sure (desktop only) . It
    still bolds everything I copy from Google docs.
    I made some tests by pasting plain text to a new Google docs document and
    copying it to anki and anki bolded it.
    It doesn't do the same from anywhere else I have tested.
    Interesting enough, I was using the previous version due to this reason
    alone.

    Best regards

  5. 5 Posted by Rasmus Underbje... on 15 Jan, 2020 02:43 PM

    Rasmus Underbjerg Pinnerup's Avatar

    I'm also noticing odd copy-paste behaviour, that I think appeared in 2.1.17. I don't know if it may be the same issue.

    When I copy text from a web page, it now copies much more formatting than it used to. Say, if I copy a simple word "perhaps" with CTRL+C and CTRL+V, it ends up in Anki as "<span style="color: rgb(0, 19, 32);">perhaps</span>".

    BTW: Very nice improvement to the handling of right-to-left text :)

  6. Support Staff 6 Posted by Damien Elmes on 16 Jan, 2020 12:03 AM

    Damien Elmes's Avatar

    Anki preserves more formatting by default - you either either clear it using the remove formatting button, or paste with ctrl+shift+v to exclude formatting.

    I'm not able to reproduce the Google docs issue using the latest Chrome and the latest Anki.

  7. 7 Posted by Rasmus Underbje... on 16 Jan, 2020 11:14 AM

    Rasmus Underbjerg Pinnerup's Avatar

    Would it be possible to make an option somewhere to strip the formatting by default? I very often make cards by copying text from online dictionaries (as I guess do many other users), and I really don't want colour codes brought along (the text often looks very differently in Anki, especially with the night mode shift). CTRL+SHIFT+V is much more troublesome to use when you have to use it many times every day.

  8. 8 Posted by Ricardo B. dos ... on 16 Jan, 2020 02:22 PM

    Ricardo B. dos Reis's Avatar

    I have found a solution using 3rd party program which pastes as plain text

    Doesn't solve the problem but works around

    Main issue is I cannot explain why specifically with Google docs unbolded
    words are bolded on copy and paste and specifically on the new version of
    anki (previous ones this did not occur)

  9. 9 Posted by Rasmus Underbje... on 16 Jan, 2020 04:19 PM

    Rasmus Underbjerg Pinnerup's Avatar

    I've found that the SHIFT+INSERT method of pasting seems to strip formatting. That is a much more manageable shortcut, even if it requires two hands (but didn't that shortcut use to preserve more formatting).

    @Ricardo: Does the text you copy from Google Docs become bold when you use SHIFT+INSERT (or CTRL+SHIFT+V) to paste the text?

    If I copy a random word, say "word", from a standard document in Google Docs, using the CTRL+V shortcut, it shows up in Anki as "<b><span style="font-weight: 400;">word</span></b>" when viewed using the Anki HTML Editor, using Anki 2.1.17 (c69ccb50) on Ubuntu Linux. It doesn't show up as bold in regular viewing mode (likely due to the font-weight style property, but the <b> tags are there).

    If I use the SHIFT+INSERT (or CTRL+SHIFT+V) shortcuts, it shows up as expected (with no superfluous formatting).

  10. 10 Posted by Ricardo B. dos ... on 16 Jan, 2020 04:53 PM

    Ricardo B. dos Reis's Avatar

    Howdy Rasmus, tested your hypothesis, results were as following:

    * test * - shift insert
    *test* - ctrl v
    test - puretext (hotkey to "ctrl \")
    *test* - ctrl shift v

    only using the 3rd party "puretext" was i able to unbold it

    i do not have any addons in chrome installed during test (i disabled night
    mode)
    i disabled all addons on anki as well
    i reinstalled anki on my desktop

    reason why i am invested in this is because i found a solution, but as an
    OCD user i spent hours trying to figure this out, i am sure there are
    others out there who would benefit from a solution

    best regards!

  11. 11 Posted by Ricardo on 16 Jan, 2020 04:59 PM

    Ricardo's Avatar

    here is a print screen of the testing while addons are disabled and newest version of anki is installed.

  12. 12 Posted by Rasmus Underbje... on 16 Jan, 2020 05:00 PM

    Rasmus Underbjerg Pinnerup's Avatar

    I just saw that Anki 2.1.19 is out with a new option in Preferences to automatically strip formatting on paste. That solves the problem for me. Fantastic! :)

    @Ricardo: Try to see if it doesn't work for you as well :)

  13. 13 Posted by Ricardo B. dos ... on 16 Jan, 2020 05:01 PM

    Ricardo B. dos Reis's Avatar

    i am sorry the formating didnt work out on the reply, i tried adding a
    screen shot but systema said i needed to be logged in. i will try attaching
    it here on the email, hopefuly it will be fowarded to the forum
    [image: image.png]

  14. 14 Posted by Ricardo B. dos ... on 16 Jan, 2020 05:05 PM

    Ricardo B. dos Reis's Avatar

    HOLY SHIT IT IS FIXED!!!
    hurraaaay!
    thanks bud

  15. 15 Posted by Rasmus Underbje... on 16 Jan, 2020 05:36 PM

    Rasmus Underbjerg Pinnerup's Avatar

    I'm very glad that the issue is now fixed for both of us. All thanks should go to Damien :)

  16. 16 Posted by mnating on 19 Jan, 2020 09:49 AM

    mnating's Avatar

    I just saw that Anki 2.1.19 is out with a new option in Preferences to automatically strip formatting on paste.

    Awesome, thank you Damien! I am overjoyed to learn that under default settings I can use Ctrl+Shift+V to strip formatting, or flip a toggle in the new preferences so it swaps the hotkeys making Ctrl+V strip formatting and Ctrl+Shift+V preserve formatting!

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac