Text formatting within textarea
        Posted  
        
            by musoNic80
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by musoNic80
        
        
        
        Published on 2010-03-18T12:11:20Z
        Indexed on 
            2010/03/18
            12:31 UTC
        
        
        Read the original article
        Hit count: 514
        
Variations on my problem have been discussed elsewhere, so I hope I'm not duplicating! I'm implementing a simple Private Messaging System as part of a web app. I've got an annoying problem though when dynamically inserting text into a textarea box in order to make a reply. Getting the content and displaying it is fine, but I can't work out how to format it correctly. Obviously, I can't use html tags, but plain text formatting like line breaks and carriage returns seem to be ignored too. This happens when an existing message is being displayed either as part of a reply or as a thread in a new message. How do I check what formatting is being saved in my db? Or indeed what formatting is being sent back from my db?!
© Stack Overflow or respective owner