Damien Elmes
f33f2f4356
fix failing checks
2019-12-22 12:30:29 +10:00
Glutanimate
cb9d04a0eb
Add type hints for a few more methods commonly accessed by add-ons
2019-12-22 00:12:09 +01:00
Damien Elmes
c1587254f4
use isort to tidy up imports
2019-12-20 19:19:29 +10:00
Damien Elmes
b9f564f49a
change wrap() to wrap2() to avoid breaking add-ons
2019-12-17 18:27:41 +10:00
Damien Elmes
d7cb7eaea0
avoid recalculating reqs in actions like adding cards
2019-12-16 20:27:58 +10:00
Damien Elmes
eee099c0b2
add a few hints to some commonly used code
...
and add the extra hints mypy wanted
2019-12-16 19:46:40 +10:00
Damien Elmes
987256ff26
extended pasting is now the default
2019-12-06 13:37:50 +10:00
Arthur Milchior
d598434bde
Fields are blank compare to previous note
...
So if a note is not empty but only because sticky fields didn't
change, then it's considered as empty and we can close the windows
without asking
2019-11-23 03:04:08 +01:00
Damien Elmes
98a866c2cb
support multiple urls at once in editor
2019-09-02 10:17:04 +10:00
Damien Elmes
c7201b0c3a
prefix non-breaking spaces
...
https://anki.tenderapp.com/discussions/ankidesktop/34512-first-space-is-omitted-when-pasting
2019-06-10 09:41:29 +10:00
Damien Elmes
b4019473ab
fix formatting being lost in inter-field pasting on macOS
...
ownsClipboard() always returns false on macOS
regression introduced in PR 274
2019-04-29 12:30:52 +10:00
Damien Elmes
8de0e7e54c
handle blur/key event before note id set
...
can't reproduce the issue here, but presumably this change will
work around
https://anki.tenderapp.com/discussions/ankidesktop/33038-bug-after-updatehtml-notes-wont-display
2019-03-10 08:24:44 +10:00
Damien Elmes
ebdd8dae4b
tidy up unused imports
2019-03-04 17:25:19 +10:00
Damien Elmes
f6b2135129
fix some warnings
2019-03-04 16:01:10 +10:00
Damien Elmes
444abfff94
avoid nbsp for single spaces when pasting text
...
https://anki.tenderapp.com/discussions/ankidesktop/32823-all-spaces-are-being-replaced-with-nbsp-when-pasting-219-linux
2019-02-27 13:54:50 +10:00
Damien Elmes
080118876a
preserve whitespace when pasting text
2019-02-06 12:00:50 +10:00
Damien Elmes
1603a5224e
fix context menu in editor, and move workaround into shared function
2019-02-05 14:37:07 +10:00
Damien Elmes
372d5ed6e8
update copyright and clarify licenses
2019-02-05 14:01:33 +10:00
Damien Elmes
318765cb2e
remove another newline case from empty fields
...
thanks to dlon: https://github.com/dae/anki/pull/273
2019-01-29 08:29:01 +10:00
Damien Elmes
57d566d670
Merge pull request #273 from zjosua/reinstate-mungehtml
...
Reinstate mungeHTML in editor.py
2019-01-29 08:26:47 +10:00
Damien Elmes
c8b5ce1b66
Merge pull request #275 from glutanimate/editor-addbutton-qrc-support
...
Add support for button icons stored in Qt resource system
2019-01-29 08:26:07 +10:00
Glutanimate
709bfa4a11
Add support for button icons stored in Qt resource system
2019-01-26 20:42:56 +01:00
David Lönnhager
106134be33
Fix crash caused by cutting and copying
2019-01-26 04:29:05 +01:00
zjosua
4981fa187a
Reinstate mungeHTML in editor.py
...
The removal of this function in #270 causes <br> to remain in seemingly
empty editor fields, which in turn wrongly prompts the "Close and lose
current input?" dialog.
2019-01-25 23:12:48 +01:00
David Lönnhager
4ca2220117
Remove <br> from empty fields.
2019-01-19 19:36:55 +01:00
Damien Elmes
f91e30a2c1
fix field content showing in top button area
2018-12-22 13:27:12 +10:00
Damien Elmes
2131c0049f
restore tooltips for fields/cards
2018-12-07 08:33:47 +10:00
Damien Elmes
2c30ad9593
fix editor buttons overlapping field content
...
https://anki.tenderapp.com/discussions/ankidesktop/31235-editor-second-row-for-buttons-feature-request
2018-12-03 09:54:51 +10:00
Damien Elmes
ed665557d5
ensure card list updated when editing html
...
using an extra hook is ugly, but there's a risk re-purposing
the editTimer hook will break an add-on that assumes the note
has already been loaded
https://anki.tenderapp.com/discussions/ankidesktop/30972-bug-editing-html-in-browser-not-saved-unless-tabbingclicking-to-other-field
2018-11-27 18:00:57 +10:00
Damien Elmes
204ed5c18a
fix font hack
2018-11-15 14:04:08 +10:00
Damien Elmes
7f85218b5a
paste links as anchors if shift held down
2018-11-12 16:39:24 +10:00
Damien Elmes
ed411b0cc9
add hack for font name consistency issue
...
https://anki.tenderapp.com/discussions/ankidesktop/30785-bug-font-not-applying-to-japanese-characters
2018-11-12 16:30:11 +10:00
Gabriel McManus
893ebfab60
Properly escape pasted URLs
...
If a URL is pasted and it isn't converted to a media link, then it
should be treated as normal text and properly escaped.
2018-09-29 00:47:45 +00:00
Damien Elmes
dfd23f6a41
use anki requests client for common user agent name
...
some websites are blocking access from the generic requests UA - now
they can choose whether they wish to block Anki or not
2018-09-19 23:49:56 +10:00
Damien Elmes
30f9d1e9c4
handle 'jpg' and leading space in inlined images
2018-08-20 13:02:30 +10:00
Damien Elmes
6cc9b5cde4
favour urls over images in local file case
...
fixes copying&pasting from finder pasting icons instead of actual image
https://anki.tenderapp.com/discussions/ankidesktop/29082-found-several-issues-in-anki-21
2018-08-08 12:46:51 +10:00
Damien Elmes
a389987530
fix images not pasting as links
2018-08-08 12:45:59 +10:00
Damien Elmes
7074893af7
rewrite data uris from html pastes as well
2018-08-08 11:38:45 +10:00
Damien Elmes
a1d1ea9b23
shortcut to mhchem
2018-08-06 13:17:57 +10:00
Damien Elmes
c840364cd3
add webm
2018-07-30 12:06:38 +10:00
Damien Elmes
46a540e22f
sync field contents before applying cloze deletion
...
based on a patch by dlon:
https://github.com/dae/anki/pull/236
2018-05-28 13:40:35 +10:00
Damien Elmes
0de4e65950
fix previously pasted image appearing in place of drop/text paste
...
mime.imageData() was returning stale data, and may have been causing
crashes as well
2018-05-10 16:44:55 +10:00
Damien Elmes
88de6b5075
support pasting of images from inlined base64 text
...
chrome exports image data as text when using 'copy image location'
2018-05-01 13:16:46 +10:00
Damien Elmes
5bf3349e05
favour images over urls when pasting
...
fixes dragging of images from safari+google images, and pasting of
'copy image' from chrome
2018-05-01 12:47:41 +10:00
Damien Elmes
38178e5281
catch attempts to save field contents to wrong note
2018-04-30 15:15:20 +10:00
Damien Elmes
35516048a7
sox was dropped years ago
2018-04-19 17:15:49 +10:00
Damien Elmes
821b6a65aa
Revert "work around issues writing to Windows clipboard"
...
This reverts commit 25c3f2cb24
.
seemed to be causing crashes, and the underlying race condition wasn't solved
2018-04-06 16:46:09 +10:00
Damien Elmes
dc6ebca944
filter middle click pastes
2018-03-02 11:16:02 +10:00
Damien Elmes
25c3f2cb24
work around issues writing to Windows clipboard
...
https://anki.tenderapp.com/discussions/beta-testing/1014-cannot-copy-from-fields-in-anki-210beta36
2018-03-01 15:53:25 +10:00
Damien Elmes
5cd063a8bd
check shift key when paste starts; avoid progress dlg for local file
...
https://anki.tenderapp.com/discussions/ankidesktop/26661-conot-paste-image-and-text-together-from-word-into-anki
2018-02-05 13:40:56 +10:00