Search code examples
ms-wordtext-formatting

How can I retain Word document formatting when pasting into a web form?


When pasting a Word .doc or .rtf letter into a web form e.g into a textarea most of the document formatting (like bold or centering) is lost. Is there any way to do so without losing the formatting?


Solution

  • Not as long as you're using plain text areas: the textarea element is intended to carry only unformatted text. If you need formatted text, you could try a javascript framework providing such.

    AFAIK, Dojo has an editor widget that could contain formatted text.