Anki add-on: remove linebreaks / do word wrap

This add-on tries to remove all line breaks from selected text or when no text is selected the whole field. This is e.g. useful when pasting text from PDF files. This add-on offers some configuration options (like the shortcut). You should adjust the default shortcut combination. If the shortcut suddenly stops working you should check if you have a shortcut conflict: If the same shortcut is set twice (e.g in Anki and one add-on or in two add-ons) then the shortcut is not working anymore. # some features if text is selected, only the selection is affected. can be called from context menu you can undo the action with Ctrl+Z tries to preserve double line breaks the add-on tries to remove "-" which are at the end of the line. A crude algorithm is used that might remove too much or too little. # Versions 2025-08-27 fix for 25.02+ 2022-09-28 fix for 2.1.50+, better soft hyphen removal, some code cleanup 2021-12-11 new icon I like better, misc 2021-04-12 fix for 2.1.41+ 2020-05-11 always undo with Ctrl/Cmd+Z, keep formatting when replacing whole field contents. Both changes are made possible by moving the replacing code from python to js (in the webview). Now the add-on always tries to remove "-" at the end of a line, there's no more user setting to deactivate this. If you still have such a user setting it will have no effect. 2019-04-11 initial release # Problems, Bugs, Errors, Improvements There's a good chance that you'll find bugs. If you find one or have a bug fix or improvement you can tell me in the official support forum or on github . # other authors This add-on is an extended modification of RemoveLinebreak (which has been unchanged for over three years and looks abandoned). 2016 Remco32 2014 Jeff Baitis 2022 abdnh (pull request 4)

GitHub repository: ijgnd/anki21__remove_linebreaks__do_word_wrap
Languages: Python, HTML