12 1
Contact Author Sign in to rate

paste plain/unformatted text

0.01MB. Updated 2020-11-08. Only supports Anki 2.1.x.
The author has shared 70 other item(s).

Description

sometimes ctrl+shift+v strips too little, sometimes ctrl+shift+v strips too much (like linebreaks), sometimes ctrl+v keeps too much formatting. Maybe in some of these cases this add-on is useful. This add-on does NOT change how ctrl+v/ctrl+shift+v or "Paste" from the context menu work. This add-on adds a shortcut you can configure (default "Ctrl+Meta/Win+v") and the option "Paste as Plain Text" to the editor context menu. But this will not solve all paste problems. Try it out. If it doesn't do what you like delete it. This add-on only affects what's in your clipboard. It doesn't affect the rest of the editor. So if you paste into some text that's formatted the inserted text will "inherit" the same formatting. To put unformatted text into a formatted region maybe have a look at the add-on extended (table) editor. The add-on editor - remove more formatting for selection (headings, hyperlinks, ...) might also be relevant. If you find a bug or have an improvement you can tell me at github where I can answer properly. Use this at your own risk. The meaning of ctrl+v/ctrl+shift+v has changed over the lifetime of 2.1: - 2.1.16 or earlier: ctrl+v strips most formatting, ctrl+shift+v keeps more formatting - 2.1.17 and 2.1.28: ctrl+v keeps most formatting, ctrl+shift+v removes more formatting. The meaning was inversed. see this commit - 2.1.19 or later introduced an option in the config: "Paste without shift key strips formatting". Default is off, so the behavior is as in 2.1.16 or earlier, see this commit. In the following screenshot I pasted a list that I copied from the description of another popular add-on . I pasted it three times (from top to bottom): - Anki built-in: stripped formatting - Anki built-in: keeps more formatting - my add-on "Paste as Plain Text" from the context menu. Instead of a html list the list entries are indented with four spaces. # Versions - 2020-11-08 don't insert nbsp;s - 2020-02-28 minor updates: default shortcut, optional button, ... - 2019-09-05 initial release

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

107041104

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1635354016
cool
on 1634012622
it works!
on 1624974980
It's really quit an essential feature. Nice!
on 1616004280
nice
on 1610186032
Works as advertised for my use case (paste Wikipedia text without the HTML formatting). Thanks!
on 1604816029
Works as specified. I would love the version that just uses clt+v. Changing this in the settings doesn't work.
Comment from author
Indeed this could be useful. But I won't try to include this for the foreseeable future:

- In general if an add-on wants to use a shortcut that's already used elsewhere it has to disable the other shortcut first. That's some work.
- "Ctrl+V" (as well as Ctrl+C, etc) is treated differently than regular shortcuts. If I wanted to use "Ctrl+V" for my custom paste function I could not use the Anki APIs(hooks) for add-ons for creating custom shortcuts or buttons - instead I'd have to use custom versions of the underlying functions which is much more complicated, error prone, and much more likely to break with updates. Even the powerful add-on "Customize Keyboard Shortcuts", https://ankiweb.net/shared/info/24411424, does not offer to remap Ctrl+V at the moment.
on 1600764321
Thank you so much !
i can go much faster to create new cards !
on 1600239552
Works like a charm. Wish this was the default behaviour on Anki.
on 1599174541
It is what I needed for such a long time! Thank you so much for creating this add on!
on 1589963339
helpful
on 1579227562
very good
on 1579183469
Didn't work, better use "ctrl + shift + v" (Anki 2.1.17).
on 1568948287
so good for my code format ,thank you