Commit Graph

50 Commits

Author SHA1 Message Date
Damien Elmes
9ccb21fe09 fix incorrect code that was not restoring clipboard 2013-07-18 19:56:47 +09:00
Damien Elmes
6f66f11572 Merge pull request #40 from steveaw/add-hooks3
Add hooks for context menus
2013-07-16 19:08:59 -07:00
Damien Elmes
4c671b3676 work around linux crash on paste
https://anki.tenderapp.com/discussions/ankidesktop/2019-inaccessible-firewall-blocked-media-url-paste-hangs-anki-for-a-minute-until-a-network-is-unreachable-like-message-appears
2013-07-17 10:19:09 +09:00
steveaw
e5bc1650f9 Add hooks for context menus 2013-07-16 17:42:50 +10:00
Damien Elmes
ffff271362 make sure we strip <!--anki--> 2013-07-11 21:22:51 +09:00
Damien Elmes
3007d884b8 if there's no html and we have an image, use that (#915) 2013-07-11 17:43:18 +09:00
Damien Elmes
e2d2b759a4 refactor media downloading on paste/drop
- use html as the first choice for incoming drops/pastes
- when filtering incoming html, automatically localize any remote image
  references
- add a special case for pasting/dropping from google images when html
  stripping is on
- move filtering code into editor
2013-07-11 17:21:16 +09:00
Damien Elmes
077d6b8187 Revert "force webkit to output <br> when enter pressed, instead of div"
This reverts commit e63c8e5619.
2013-06-14 13:11:48 +09:00
Damien Elmes
24995de437 Revert "need to strip trailing <br /> when saving fields"
This reverts commit f10b336fb9.
2013-06-14 13:11:26 +09:00
Damien Elmes
49ea66bca9 Revert "add a hack to prevent double newlines when deleting formatting"
This reverts commit ecf9776f90.
2013-06-14 13:11:04 +09:00
Damien Elmes
426eff4cff prioritize images over html for now
when a user copies an image from the browser to the clipboard, we need to do
this so the image pastes, as we currently don't support images derived from
html pastes (issue 92)
2013-06-10 16:04:58 +09:00
Damien Elmes
78155afb09 we shouldn't be quoting sound tags 2013-05-27 12:15:21 +09:00
Damien Elmes
9c24c41b90 we do need to quote when adding media
contrary to commit 3576475, we do need to quote when adding media on windows
as well, as it seems webkit can not handle all representations variants when
passed unicode

as we're stripping # and % when adding characters, hopefully that's the last
of it!
2013-05-27 11:26:02 +09:00
Damien Elmes
48f40c4884 ignore sticky fields when checking if blank (#843) 2013-05-24 12:04:28 +09:00
Damien Elmes
cc73a3bb42 work around broken images when pasting/attaching on linux 2013-05-24 10:50:15 +09:00
Damien Elmes
ecf9776f90 add a hack to prevent double newlines when deleting formatting
prior to this change, if you entered an empty field, turned on bold,
typed some text, and then backspaced over the text, it would expand
to two lines and the formatting would not go away
2013-05-23 12:31:49 +09:00
Damien Elmes
34b7eaf4c9 replace implicit styling at the top, and catch style missing case 2013-05-23 12:00:28 +09:00
Damien Elmes
b1ae088042 can't assign tuple to bs attrs without breaking later code 2013-05-23 11:37:14 +09:00
Damien Elmes
04b010a6d1 make sure we focus first field when adding next note (#605) 2013-05-22 12:54:29 +09:00
Damien Elmes
35764757eb we shouldn't quote when adding media
- utf8/unicode is valid in the src string, provided we escape quotes
- and we escape when setting fields in the editor, leading to double escaping
  if we do that
- and we strip quotes when adding
2013-05-22 09:19:33 +09:00
Damien Elmes
26f513a7a7 strip all non-src elements when copying&pasting images between fields 2013-05-22 09:09:50 +09:00
Rob Hoelz
822e93c1d8 Add editFocusGained hook 2013-05-21 00:19:43 +02:00
Damien Elmes
f10b336fb9 need to strip trailing <br /> when saving fields 2013-05-20 15:38:05 +09:00
Damien Elmes
7ae90d7f7d prioritize html over images to fix MS issue (#449)
this means that copying&pasting images on linux/firefox will redownload the
image which is wasteful, but Windows users make up the majority of the
userbase
2013-05-18 18:38:32 +09:00
Damien Elmes
ebba215a9a cloze deletion tweaks (#601)
- allow creation of cloze deletion when note type not selected; warn with
tooltip. prevents selection from getting lost
- warn before adding cloze note type with no deletions
2013-05-17 15:57:22 +09:00
Damien Elmes
dd9f1c53be shortcut to jump to tags entry 2013-05-17 14:32:50 +09:00
Damien Elmes
da66844f6b canonify tags when saving, and strip quotes (#794) 2013-05-17 13:51:49 +09:00
Damien Elmes
e63c8e5619 force webkit to output <br> when enter pressed, instead of div
this should make it easier for mobile clients to convert into newlines
2013-05-17 13:22:58 +09:00
Damien Elmes
c45525179b replacement order must be reversed 2013-05-17 11:46:51 +09:00
Damien Elmes
faddc59232 handle % as well (#823) 2013-05-17 11:38:34 +09:00
Damien Elmes
93717df30b fix pasting/attaching with unicode chars (#813, #867)
- treat # specially instead of quoting entire string, as urllib unfortunately
  can't handle utf8 quoted text
- make sure we pass utf8 to quote() in _addMedia()
2013-05-17 11:34:15 +09:00
Damien Elmes
69e38b18e1 strip implicit span from copy&paste (#777) 2013-05-16 17:46:48 +09:00
Damien Elmes
bbe248698a correctly decode %-escaped utf8 when pasting (#865) 2013-05-16 16:41:20 +09:00
Damien Elmes
1efb03f16d allow a few more audio formats in paste 2013-05-16 16:28:45 +09:00
Damien Elmes
518a61732e fix main window coming to top after paste on win (#456) 2013-05-16 16:26:31 +09:00
Damien Elmes
e47da34cbc fix drag&drop of images with # char (#867) 2013-05-16 16:22:23 +09:00
Damien Elmes
1fb0c73e91 fix crash on linux when pasting invalid url (#858) 2013-05-16 16:21:41 +09:00
Damien Elmes
3f6266a712 fix duplicate search in browser (#855) 2013-05-16 14:17:28 +09:00
Damien Elmes
058f19b18d update obsolote activated() signals 2013-05-10 14:49:21 +09:00
Damien Elmes
4884d0edf7 handle chrome's newlines in url issue and make sure to clean up progress 2013-05-09 15:34:16 +09:00
Damien Elmes
fc2c772115 more qt5 mac fixes
- workaround for -psn_0 being passed in
- use fusion if plastique missing
2013-04-16 19:54:23 +09:00
Damien Elmes
3be7c998fc fix inverted sub/superscript shortcuts (#720) 2013-04-11 14:26:17 +09:00
Andreas Klauer
49404680e7 fix field outline overlaps with other fields 2013-03-03 01:07:35 +01:00
Damien Elmes
983c9b21cf fix reading being blanked when focused (#605) 2013-01-30 17:00:17 +09:00
Damien Elmes
c3d7a63f7e strip media when searching for duplicates 2013-01-15 06:25:21 +09:00
Damien Elmes
1717e56831 disable editor buttons until field focused 2013-01-08 11:01:32 +09:00
Damien Elmes
ebda335273 fix paste of quoted url (#351) 2012-12-22 13:42:30 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00
Damien Elmes
243c2b11ed preserve font-style/font-weight
fixes https://anki.lighthouseapp.com/projects/100923-ankidesktop/tickets/333-html-being-changed-after-the-card-is-created
2012-12-22 07:18:33 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00