One of the best loved features of EditLive! is the ability to copy and paste content from Word and produce clean, compliant XHTML. Most installations however, have a dialog pop up to ask the user what format to paste in which makes the process harder for authors. Fortunately, it takes just seconds to get rid of the dialog and make pasting from Word do what you want first time, every time.
The key to controlling word import behavior is the wordImport element in the configuration file. Changing the value of the style_option attribute changes the way that EditLive! imports content from Word. There are five options:
- user_prompt - this is the default in most of our sample configuration files. Each time the user pastes, the paste special dialog opens to allow them to select which of the four options below should be used.
- merge_embedded_styles - this options brings over all the style information from Word as CSS style definitions in the head of the document. In most CMS’s only the body of the document is saved so the style information can be lost when saving.
- merge_inline_styles - like merge_embedded_styles this option brings over all the style information, but it does so as inline style attributes so the styles won’t be lost if the CMS only saves the body content.
- clean - This is the recommended setting. It brings over the structure of the document such as headings, links, images, lists and tables, but ignores formatting so that the resulting content blends in with the rest of the site and uses the formatting from the site stylesheet.
- plain_text - Strips out all style and formatting information so just the text is inserted.
Our experience is that in most situations clean is the best option. Also note that if you include the paste special dialog in your menus, user’s can still access all of the different ways to paste by going through the “Paste Special…” menu item, but won’t be bothered by the dialog each time.