The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Formatting text within text area

  • # February 21, 2013 at 9:57 am

    I’m trying to create a form which has a text area which, when the user copy pastes a resume within the text area, the original formatting is kept intact, when the output is received by the guys handling the admin. Is it possible?

    # February 21, 2013 at 10:09 am

    what kind of formatting? Do you mean whitespace?

    Whitespace *is* preserved in form submissions, but it’s ignored (not displayed) in HTML. If that’s what your problem is, you can either output the submission inside a `

    ` element, or convert the whitespace to ` ` and/or `
    `, as appropriate.
    # February 21, 2013 at 10:50 am

    This post may be useful for you if you want the user to see the formatting when they paste it in:

    # February 22, 2013 at 4:35 am

    This reply has been reported for inappropriate content.



    pre> tag seems to capture the formatting almost accurately. Thanks. I’ll have to test the output though(when the admin guys receive the form input). Will post my results asap.


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed