Anki add-on: text editor for Latex, the selection or html source (FORK)

This is a fork of the add-on External Editor . I use the version from 2020-03-06 which works great in linux for me but I besides editing the html source I also wanted to just send the selection to an external editor as plain text. The default shortcut to save back the edited text into Anki is "Ctrl+Shift+F6", to just send the text it's "Ctrl+F6". You can adjust these in the add-on config. If you don't need my additions you should use the original version of the add-on. My add-on has more code and more code means a higher chance to run into a bug. You must probably adjust the config for your computer and adjust the path of the editor and command line arguments needed. How you do this depends on your operating system. When I use the option to re-insert the content of the temporary file back into the anki editor it's exactly at the same position. So if you had some prior formatting the reinserted text will have it applied, too. If your selected text contained closing tags these will have been removed. Example: You have <​b>Hallo<​/b>World . You select "lo Wor" and edit it to "TEST" then afterwards you'll have <​b>HalTESTld which is invalid html because there's no closing b tag. In my Anki 2.1.28 Anki automatically adds a closing b tag. So don't mindlessly use this add-on on all kinds of selections. This could be useful if you are editing latex or have one of the markdown add-ons. You can also just send the text without ever getting it back into the Anki editor (default shortcut "Ctrl+F6") Some of my cards have code snippets. Sometimes I want to tweak them and run modified versions. And maybe I'll make cards with code that needs to be fixed or completed in the future. So far I copied this code and manually opened my text editor with a new/temporary file and then pasted my selection. # Limitations I don't have a Mac so this add-on was not tested on MacOS. So you'll probably run into an error on MacOS that I can't fix. Code contributions are welcome. Use it at your own risk.