Formatting is not supportable

Discussion in 'PHP' started by OceansTech, Oct 10, 2014.

  1. OceansTech

    OceansTech New Member

    Joined:
    Oct 10, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hey....
    I have one issue. Whenever i copy some content from MS Word or MS Excel and paste that content to PHP, then after that it would not be formatted(i.e.Bold or Itallic or Font change or font size change,etc.). So please someone help me out from this problem.
    Thanks....!!!

    OceansTech
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    How you are pasting content in PHP, in a PHP editor or somewhere else?
     
  3. David Ledger

    David Ledger New Member

    Joined:
    Oct 21, 2010
    Messages:
    11
    Likes Received:
    7
    Trophy Points:
    3
    Location:
    Gloucester UK
    It isn't obvious whether it pastes as formatted and you want it plain or it pastes as plain and you want it formatted.

    Within a PHP program text formatting has no good meaning, but the (possibly invisible) codes used to specify formatting can break the PHP interpreter's reading of the program text.

    To remove those pesky codes and leave just the meaningful text first paste into a pure plain text editor then copy that pure plain text and paste into your PHP editor. Use the free TextWrangler on the Mac or Notepad on Windows.

    If you're hoping to paste formatted text into a literal PHP text string so that the formatting appears in the browser, that's not how it works. Literal text has to be plain text. Styling and formatting is done using HTML/CSS that is applied in the browser.

    David


    .
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice