I've been extremely annoyed with this issue for a while. I'm using TeXMaker on KDE to write my class notes in LaTeX and I sometimes need to copy paste text from it to some other applications while editing, the flashcard program Anki being one of them.
TeXMaker uses syntax highlighting and for some reason hitting copy paste will copy the color tags with it together with tags for formatting. The end result is that Anki will treat the color tags as part of the LaTeX code and feed the code together with color tags into LaTeX, which of course makes any LaTeX compile fail.
It seems like KDE apps include formatting and color data in the data that is sent to the clipboard. In other words it won't just be a sequence consisting of the characters you've typed, but it will contain various tags that essentially look like HTML.
Anyone else stumbled on the same problem? Any way to fix it?