I added the text format code into the popUpText function, and it works! Guess it just had to be part of the function and not added separately.