anki-editor icon indicating copy to clipboard operation
anki-editor copied to clipboard

Default content to back field

Open leoc opened this issue 4 years ago • 3 comments

This change lets the building of fields default to the back field for content that does not contain another child heading.

Regarding #61 and #59

Now we can write:

* My question for the front?
** Back
My answer at the back of the card...

as

* My question for the front?
My answer at the back of the card...

No need to specify a "Back" heading.

Maybe we can use "per-card-type" field names...

Cheers!

leoc avatar Sep 01 '20 14:09 leoc

@louietan any chance you could merge this?

gsingh93 avatar Mar 19 '21 01:03 gsingh93

Can this be merged into master? It would be really helpful.

searene avatar Sep 11 '21 13:09 searene

This commit in orgtre/anki-editor provides the functionality of this pull request. It also allows a more general logic:

  • If exactly one field is omitted (based on the ANKI_NOTE_TYPE), then the content between the note heading and the first subheading (or the next same-level heading) is mapped to the missing field.
  • Moreover, if exactly two fields are omitted, the note heading is mapped to the first missing field, and the second missing field is mapped as described in the previous sentence.

orgtre avatar Oct 31 '22 12:10 orgtre