Is there a way to make Anki remove
<div/>'s/replace them with
<br/>'s? Or at least remove them completely so I can add newlines myself?
I already have “Remove formatting on paste” enabled but copying example sentences from the web (for example from spanishdict, example+translation below the entry word) always results in new line being done as wrapping within
<div/> which is quite annoying… It works well if I paste it to (plain) text editor first and then back to Anki. Or paste it to “source editor” (cmd+shift+x) and paste it there…
Version 2.1.65 (aa9a734f)
Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
DIVs and BRs are not identical in behaviour, so I’m not sure Anki could replace one with the other without leading to undesirable formatting in some cases. If you want to completely discard the formatting and newlines, and the text does not have angle brackets in it, one option would be to paste it into the HTML editor instead.
I’m aware they are not identical, though for all intents and purposes in here, they could be considered semantically-identical-enough
As for stripping it - I’m already doing that via html editor (cmd+shift+x) but it’s somewhat inconvenient.
Would be awesome to simply strip it altogether when “Remove formatting option” is enabled.
EDIT: (I’m just doing anki…) one of the annoying things with using html editor is that you can’t easily insert new-line (that would be visible) - one has to type explicitly
<br/> so I usually enable html editor, paste the thing there (to strip formatting) and then alt-tab back to normal view to insert new-lines where needed… with lot’s of pasting (couple of examples) this is quite hectic workflow
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.