badlydrawnrob/anki

Use `HTML` mode by default for `pre block` and other fields

badlydrawnrob opened this issue · 2 comments

There's two ways to format a field.

  1. Rich text field with a rich text icon A𝐴.
  2. HTML field with html code icon <>.

All code block fields are default as HTML field.

Both field modes can be toggled on and off, and you can preview one with the other. The code block fields can be viewed with a "live preview" by pressing A𝐴. Rich Text option can be handy for adding bold, italic and [...] cloze deletion text.1 See Anki documentation on editing features for more information.

Screenshot 2023-11-29 at 14 23 42 Screenshot 2023-11-29 at 14 45 32

You can make 2 the default by going to `fields -> select field -> toggle "Use HTML editor by default"

This may mean I have to get rid of some of the <code> tags in the template, or make it clear on the text fields the <code>...</code> tag is already there.

And as for Missing! cards (cloze deletion):

  1. If you have {{c1::cloze tags}} in a field that isn't designated for cloze deletions, Anki will complain LOUDLY!
  2. Make sure you add cloze tags in rich text mode by clicking the A𝐴 button.
    • It's generally safer to write the {{c1::cloze deletion}} tag manually
    • However, you can also add a cloze deletion with the [...] cloze button.
    • To create a new card (such as {{c2::new Missing! card}} you can use the [...]+ button.
Screenshot 2023-11-26 at 21 43 25 Screenshot 2023-11-29 at 14 32 46

Footnotes

  1. Sometimes using the [...] and [...]+ buttons can cause Anki to break HTML formatting. Write the {{c1::cloze deletion}} tags manually in the A𝐴 Rich Text mode to avoid this.

See also this thread discussing the two editor styles

Closing this as done. Added issue to the main README