Skip to content
jefdongus edited this page Mar 8, 2020 · 9 revisions

Q: How do I insert raw HTML?

If a key starts/ends with :: (eg. ::key::), the corresponding symbol will be treated as raw HTML. Note: If a symbol ends with a HTML tag, the tag will still be active when the next character is pressed (ie. if the inserted symbol was <b>some text</b>, the next character one types will still be bold). This appears to be a property of the text editor that Anki uses.

Q: Can I use this plugin when searching for cards?

Yes, this plugin works in the card browser. However, please note that while inserting symbols into the search bar works most of the time, it is not guaranteed to work all the time (eg. with emojis and other complex symbols).

Q: What are the rules for valid keys?

Keys must:

  • Contain at least one non-whitespace character
  • Not be duplicates of other keys
  • Whitespace at the start and end of keys will be removed
  • Keys that start and end with :: designate a HTML block

Q: Does this plugin detect key conflicts?

Other than duplicate keys, it is up to the user to make sure keys do not conflict with each other. For example, if abc and abc def are both keys, the second will never trigger since the first replacement will always occur first.

Q: What are the rules for valid values?

Values must contain at least one character. Multiple keys can map to the same value.

Q: Are there any conflicting add-ons?

The following plugins are known to not work:

Please report any additional conflicts by opening a new issue.

Q: I noticed that sometimes symbol replacement occurs immediately after typing a key and sometimes it doesn't. What's going on under the hood?

Replacement occurs immediately for keys that start/end with :, certain arrows, and HTML blocks. Otherwise, replacement occurs after a whitespace character is pressed. This is so that the plugin won't get in the way of everyday typing (eg. if a user creates an rule to autocorrect Teh to The, we don't want Tehran to turn into Theran) but will still feel responsive when entering symbols. This behavior mimics the autocorrect function in LibreOffice.