How do I resize line length on my Anki cards?

I’m making Anki cards for my computer science class.
I pasted some of the answers from a website that collates all of the information I have to learn, but the lines are long when I paste them on my Anki cards.
When it comes to learning them on Anki mobile app the lines are too long. I want them to fit onto the screen and just scroll down.

Picture of what I mean

Any help around resizing line length to fit the screen on Anki cards would be great

Thank you

^ As you can see the line doesn’t wrap to fit the screen, it just carries on going to the right

Maybe the words in your notes are separated by non-breaking spaces ( ) instead of regular spaces?
That could be an explanation as to why the line doesn’t wrap to fit the screen.

You can check this by opening the Edit Note window and then the HTML editor.
If that’s the case, maybe try to manually modify a couple notes to see if it fixes the problem.
Then, you can use AnkiDesktop’s Find and Replace function to replace all   with normal spaces.

How to replace all non-breaking spaces with regular spaces (AnkiDesktop)

(It is a good idea to do a backup before this operation, just in case.)

  • open the browser
  • search  
  • select all the notes you want to edit
  • click on the Notes button in the top bar and then Find And Replace

  • Set the filter like in the image below
    (remember to add a space inside the ‘Replace With’ field, do not just leave it empty, or the non-breaking spaces will simply be deleted instead of being replaced with regular spaces)
  • Click on ok

image

If this did not fix it and/or you need further help, please post a screenshot of this note’s HTML and Card Templates

2 Likes

It looks like your fields are styling that text with pre. Adding the following to your card template’s styling section will allow the text to wrap:

pre { white-space: pre-wrap; }
3 Likes