I am relatively new to anki and am facing an issue when copying/pasting text from my notes over to anki. Below is what my notes in google docs look like and I am trying to copy/paste it over, but when I do so, anki strips all the text formatting, including the colors.
I have spent like the past hour trying to debug this, including trying like pasting with/wiwthout shift and 2 separate add-ons. I have anki 25.02.5 for reference. My big gripe is how to preserve the text color. It has no issue preserving it when I copy from google docs to word, and I also tried word to anki but same issue persists.
<span style="color: red;">aaa</span> <span style="color: rgb(0, 176, 240);">ssss</span> <span style="color: rgb(84, 130, 53);"><span style="color:windowtext">dddd</span></span> <span style="color: rgb(237, 125, 49);">fffff</span>
``
It won't display properly in Anki because it
color:windowtext
I think there's a similar reason.
But I'm generally a proponent of color being modifiable by styles, not so rigidly
color: rgb(84, 130, 53);
So when I need to, I prefer to use either bold or italics and then change it in Anki, either by color, or just leave it as is.
But if I do it in Word and then paste it, a lot of stuff gets thrown into the field, and I'm against that.
If you click this button, the code will be shown…exactly what’s hidden in Word. Unfortunately, if the code is complex, it will just mess it up unnecessarily. It’s easier to somehow change the design so it’s easier to do in Anki itself, or not do it at all, and let Anki figure it out. I can’t say for sure, but some people like one color, but it can be difficult to customize it later…or you’ll get bored and it will be complicated, so the simpler the better.
I expect this is because the colors that are displayed in Docs or Word aren’t in HTML. Your notes/cards in Anki are written in HTML, so if whatever you pick up in your copy-buffer doesn’t include those HTML tags, there’s nothing that tells Anki what colors to apply to it when you paste it. Basically, those colors aren’t “real” as far as Anki is concerned.
Have you tried saving your notes in a different format that encodes the color-formatting as HTML?