Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTML mode by default for pre block and other fields #62

Closed
badlydrawnrob opened this issue Nov 26, 2023 · 3 comments
Closed

Use HTML mode by default for pre block and other fields #62

badlydrawnrob opened this issue Nov 26, 2023 · 3 comments

Comments

@badlydrawnrob
Copy link
Owner

badlydrawnrob commented Nov 26, 2023

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.

HTML mode as default

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

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

Adding {{c1::Cloze Tag}} to Missing! card

If you have {{c1::Cloze Tag}} in a field that isn't designated for cloze deletions, Anki will complain LOUDLY!

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.
  • You can also create a hint {{c2::cloze tag::hint}} to give you a little clue as to what the missing text is.
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.

@badlydrawnrob
Copy link
Owner Author

See also this thread discussing the two editor styles

@badlydrawnrob
Copy link
Owner Author

Closing this as done. Added issue to the main README

@badlydrawnrob badlydrawnrob changed the title Use HTML fields by default? Use HTML mode by default for pre block and other fields Jan 15, 2024
@badlydrawnrob
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant