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

Feature quick field mappings

Open leoc opened this issue 4 years ago • 2 comments

See #59

This should work with the latest develop.

leoc avatar Nov 28 '19 14:11 leoc

Extracted the exporting to reuse your latest changes for the quick fields aswell.

leoc avatar Nov 29 '19 13:11 leoc

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.

The only thing that is missing (?) seems to be that as it's implemented in orgtre/anki-editor the field order of the note type controls which field goes to the heading and content. There is no custom option anki-editor-quick-field-mapping to control this, instead one can change the note type to change the mapping. If people want such an option or if there is something else we're missing at orgtre/anki-editor I'd welcome a pull request.

orgtre avatar Oct 31 '22 13:10 orgtre