Suggest a feature to render `<br/>` as real line breaking in edit page with HTML view in iOS Anki, like that in AnkiDroid?

In the Card Editor’s HTML/Code View on iOS Anki, I can directly edit raw HTML (e.g., modifying <span class=""> for styling). This is essential for my workflow because I use <span class=""> to highlight important words in my cards, as I use the Custom Style add-on on PC to add span class.

However, I noticed a rendering difference between iOS and AnkiDroid:

  • AnkiDroid: <br/> and <div> are** rendered as actual line breaks**, and it’s possible for pressing Enter to insert a line break. It makes me easier to add span class style of my cards because it’s more easier to locate my target contents.
  • iOS Anki: Line breaks are not visually rendered in Code View, making it difficult to locate text for adding span classes (the HTML appears as a “mess” of unformatted text).

Is there a setting or feature in AnkiDroid/iOS to align the Code View behavior? Ideally, I’d like iOS to render line breaks like AnkiDroid for easier editing.

Thank you for your hard work and any guidance!

1 Like

It’s possible this is related to “Replace newlines with HTML” in AnkiDroid [Settings > Advanced]. It’s hard to know whether to call this a feature, or a bug, or a workaround – I guess, beauty is in the eye of the beholder. :sweat_smile: For some users’ workflows, this setting gives them something they want – for some (especially when editing happens on multiple platforms), this causes unexpected gaps in their fields.

See if these posts and examples look familiar to you. Some of the suggestions there might help you find a way to get more consistent behavior across platforms without any change to the code.

I think the work that is already underway to bring the editor interfaces closer together – like integrating the desktop editor into AnkiMobile and updating the AnkiDroid editor – will make these distinctions moot, or at least less noticeable.

If this isn’t related to what you’re seeing and I’ve missed the mark – it might help if you can show an example of a note you have where the HTML looks different on desktop vs. AnkiDroid vs. AnkiMobile – after it is saved and synced.