Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are coding a WYSIWYG editor, then that will (almost certainly) be done in Javascript, and you won't have to worry about how the formatted text from Microsoft Word is represented before it is pasted, because you will not have access to this anyway.</p> <p>You will, however, need to worry about how it is represented in HTML once the user presses paste, and the browser requests and processes this and pastes the result into the ContentEditable/DesignMode element as HTML nodes.</p> <p>To a large extent, how well it is formatted in HTML is dependent on how well it was formatted in Word. As we know, it is easy to be non-semantic in Word, by using the font size drop-down instead of altering paragraph styles, by using bullet characters rather than actual bulleted or numbered lists, etc. If you depend on bulletted lists becoming proper HTML unordered lists, you will need to hope that whoever added them in Word added them using the list function, or you will have extra complicated processing to do otherwise.</p> <p>The end result may also be influenced by which browser the user is using, whether it's in quirks mode, and which version of Word they are using. Also, the same document opened in OpenOffice will paste differently into HTML in the browser. You will need to use a general-purpose HTML filter and sanitiser, server-side.</p> <p>In addition, you will probably want to filter out the following, at a minimum, from the resultant HTML (unless you are interested in preserving any custom style the user added, regardless of its appropriateness for the web):</p> <ul> <li>IE-specific conditional comments. Sometimes these end up in the resulting HTML</li> <li>Any inline styles, including the <code>style=</code> attribute, <code>&lt;style&gt;</code> elements, etc.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload