Commit Graph

94 Commits

Author SHA1 Message Date
Damien Elmes
901c285a12 use single .gitignore file 2019-12-18 21:06:24 +10:00
Damien Elmes
ddb4db0c96 editor 2019-12-18 13:55:52 +10:00
Damien Elmes
b3f6199827 reviewer 2019-12-18 13:32:32 +10:00
Damien Elmes
cdcf482913 reviewer-bottom 2019-12-18 13:27:39 +10:00
Damien Elmes
de29b02089 deckbrowser and overview 2019-12-18 13:21:58 +10:00
Damien Elmes
f080616eed webview.ts 2019-12-18 13:02:11 +10:00
Damien Elmes
b9f564f49a change wrap() to wrap2() to avoid breaking add-ons 2019-12-17 18:27:41 +10:00
Damien Elmes
df29061327 remove ruby tags when pasting without formatting 2019-12-17 07:19:15 +10:00
Elender
056f90bdea
Update editor.js
Added ruby and ruby text tags
2019-12-16 15:30:42 -03:00
Damien Elmes
b1ab681571 preserve contextual formatting when wrapping text
https://anki.tenderapp.com/discussions/ankidesktop/37385-cloze-is-stripping-formatting-enlarging-text

any formatting inside the selection is removed, but formatting that
starts and ends outside the selection will be preserved
2019-12-09 12:52:18 +10:00
Damien Elmes
4f4a05e1ae fix bold/italics/underline regression 2019-12-09 09:46:16 +10:00
Damien Elmes
4fda2358b0 handle formatting from google docs 2019-12-06 14:08:59 +10:00
Damien Elmes
e2d7e5a8d7 preserve color in font tags
https://anki.tenderapp.com/discussions/ankidesktop/34688-format-of-copying
2019-12-06 13:44:06 +10:00
Damien Elmes
eacf788b40 strip bold/italics/underline when pasting without formatting
https://anki.tenderapp.com/discussions/ankidesktop/34413-formatting-is-not-fully-stripped-in-21
2019-12-06 13:40:51 +10:00
Damien Elmes
d4b87a678a preserve inline foreground/background color in spans
common in content pasted from MS Word
2019-12-06 13:39:05 +10:00
Damien Elmes
47478e584f use screen-relative max height/width
this should matche the Anki 2.0 behaviour
2019-06-06 09:53:50 +10:00
Damien Elmes
329c6d365a remove trailing <br> tag when pasting
https://anki.tenderapp.com/discussions/ankidesktop/33843-anki-2112-adds-br
https://anki.tenderapp.com/discussions/ankidesktop/33977-unwanted-automatic-line-break-insertion-after-pasting-into-a-field
2019-05-17 13:40:23 +10:00
Damien Elmes
4a2f39e8f4 Revert "Remove <br> from empty fields."
This reverts commit 4ca2220117.

The above commit caused a regression with RTL text:
https://anki.tenderapp.com/discussions/ankidesktop/33592-bugs-in-add-box
2019-04-16 18:58:59 +10:00
Damien Elmes
7120607dfe avoid highlighting/tabbing to top bar 2019-04-10 15:16:22 +10:00
Damien Elmes
8dbebe3583 fix fields appearing under editor buttons
https://anki.tenderapp.com/discussions/ankidesktop/33096-editor-buttons-in-additional-rows-overlap-fields-only-when-scrolled-down
2019-04-09 16:29:56 +10:00
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
dd01561537 fire saveField("key") when webview loses focus
fixes the following reported issue, caused by currentField
being sent to None:

1. Start from the main view.
2. Click Add
3. In the Add window, change deck
4. In the Choose Deck window, add a new deck, give a random name
5. Back in the Add window, call "Edit HTML"
6. Anki displays an error

This change will mean the editFocusLost hook will not fire when
switching between windows, which is probably an improvement.
2019-02-05 10:46:47 +10:00
Damien Elmes
de38313071 make sure we save field in all blur cases
https://anki.tenderapp.com/discussions/ankidesktop/32268-changes-in-editcurrent-and-addcards-not-taking-effect-when-using-mouse-rather-than-hotkey
2019-01-29 09:51:54 +10:00
David Lönnhager
4ca2220117 Remove <br> from empty fields. 2019-01-19 19:36:55 +01: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
09ff23dc70 filter font and background from all html elems in int. paste
https://anki.tenderapp.com/discussions/ankidesktop/30806-font-size-attribute-added-when-copying-text-inside-anki
2018-11-12 15:46:12 +10:00
Damien Elmes
5e5d35e9c1 change purple flag to orange 2018-11-01 14:58:41 +10:00
Damien Elmes
2866248314 add small extra margin to answer button
fixes scrollbar in Japanese mode due to half width counts + full width
times on following screen

https://anki.tenderapp.com/discussions/ankidesktop/29948-214-bugs
2018-09-28 17:52:10 +10:00
Damien Elmes
49096da7f8 enter/space should use selected answer button
https://anki.tenderapp.com/discussions/ankidesktop/29882-selecting-a-button-and-enter-or-space-always-chooses-good
2018-09-24 14:24:17 +10:00
Damien Elmes
b5785f7ec8 add a small margin between buttons during review 2018-09-07 15:51:21 +10:00
Damien Elmes
d1a09d5ed1 ignore title in html paste
https://anki.tenderapp.com/discussions/ankidesktop/29375-paste
2018-08-29 18:49:22 +10:00
Damien Elmes
c3f3a996c5 fix changes made in Windows IME not being saved
https://anki.tenderapp.com/discussions/ankidesktop/28727-last-japanese-edit-in-a-field-doesnt-take-unless-enter-is-pressed-an-extra-time
2018-07-23 12:23:38 +10:00
Damien Elmes
e1338e8733 don't collapse whitespace in extended paste mode
for pre tags
2018-06-15 11:36:12 +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
cb68be7a1b Revert "Revert "workaround for some drags not being accepted""
This reverts commit e7046ba398.

Without this change, dragging images from Google searches doesn't work on the
latest Chrome (tested on macOS).
2018-05-01 13:24:08 +10:00
Damien Elmes
844778636c preserve cursor position when switching to another window
https://anki.tenderapp.com/discussions/beta-testing/1043-anki-21-beta-37-if-switch-from-another-program-to-continue-editing-the-cursor-will-move-to-the-bottom
2018-04-30 15:26:54 +10:00
Damien Elmes
38178e5281 catch attempts to save field contents to wrong note 2018-04-30 15:15:20 +10:00
Damien Elmes
e7046ba398 Revert "workaround for some drags not being accepted"
This reverts commit 99009be1ca.

didn't fix user's problem, and has introduced issues with the cursor
disappearing
2018-02-05 11:27:14 +10:00
Damien Elmes
99009be1ca workaround for some drags not being accepted
https://anki.tenderapp.com/discussions/ankidesktop/26688-drag-and-drop-not-always-working
2018-01-30 11:06:46 +10:00
Damien Elmes
15df699479 preserve ordered lists 2018-01-27 15:26:41 +10:00
Damien Elmes
fc79f74e46 bigger margins in reviewer 2017-12-28 20:15:11 +10:00
Damien Elmes
3e05002421 don't make the body margin depend on text size 2017-12-24 22:26:55 +10:00
Damien Elmes
fccfdef73d add a flag to keep editor buttons enabled when no field selected 2017-12-08 21:06:16 +10:00
Damien Elmes
fcccf12ba6 night mode 2017-12-04 12:20:56 +10:00
Damien Elmes
b85cc4321b move overflow-wrap into body, apply to editor too 2017-11-29 16:19:34 +10:00
Damien Elmes
eda1849c33 force break word when it hits the reviewer margin 2017-11-28 09:52:56 +10:00
Damien Elmes
8233021419 fix drag&drop failing to save again
I'm guessing the move to qt 5.9.2 caused this regression
2017-10-27 18:06:21 +10:00
Damien Elmes
6fc7fbc8f2 remove unwanted whitespace in paste filter
libreoffice adds newlines to exported HTML which interfere with cloze
deletion
2017-10-26 16:36:34 +10:00
Damien Elmes
a4d32a1200 fix hang on internal paste due to shadowed var 2017-10-26 11:45:05 +10:00
Damien Elmes
b22548dd4f fix arg name 2017-10-26 11:44:51 +10:00