![]() Sometimes it’s a struggle with Word to get your document to look that way you'd like. When It Doesn’t Go So SmoothlyĪ complex or improperly formatted Word document is unlikely to transfer well when using TinyMCE “Paste from Word”. On the positive side, I find that TinyMCE typically transfers bolding, italics, underlining, strike-throughs and tables properly. The result-with little or no effort-is a document whose font styles are consistent with the rest of your site.Īs noted above, when pasting from a simple Word document, paragraph spacing may be doubled from the original and you may lose text color attributes, so these may require some manual clean-up in the post-paste content. TinyMCE will eliminate a lot of special formatting and will attempt to apply basic HTML tags such as H2 and H3 tags, which Word has probably styled via CSS. Forcing cleanup on standard paste relieves users of having to remember that they’re pasting from Word, and it automatically and transparently handles that scenario.Ī simple Word document will typically transfer well. With option 2, I have not encountered any conflicts with other TinyMCE functions, so I recommend 2 in place of option 1. With this enabled, TinyMCE assumes that any direct paste into the text area may be content from Word, and so it always evaluates it for clean-up in the same way as the "Paste from Word" tool above. In Cleanup and Output, check “Force cleanup on standard paste”.The text is then stripped of the special Word XML and CSS code and pretty cleanly pasted into the text editor as standardized HTML, although it may add extra spacing between paragraphs. The user can then copy the text from Word, click the “Paste from Word” tool, paste the content into the popup window and click Save. In Buttons and Plugins, check “Paste from Word” to enable that button on the TinyMCE toolbar.For the TinyMCE profile associated with the Drupal input format do one of these: There are two different ways to enable the Paste from Word function in TinyMCE. “Paste from Word” and “Force cleanup on standard paste” Quality Assurance Testing Checklist – Back EndĬontent Publisher Use CasesTesting on Firefox on MAC If the content has been cleaned up and converted properly, the results should look more like this: If the HTML source looks anything like the following, the content has been pasted directly from Word with no clean-up. If the features are enabled, use the TinyMCE “Edit HTML Source” toolbar button or the “Disable Input” link feature to view the HTML source. Tip: If the content of a basic page displays improperly, view the page source with your browser, or in Drupal open the page in edit mode to examine the text area HTML source. Ironically, this latter scenario happens most often when the page is viewed in Microsoft Internet Explorer. The bad news isn’t evident until someone attempts to view that page with a different browser and the page is totally misformatted or appears blank. (*This would be a user-friendly enhancement to TinyMCE.) TinyMCE does not warn you that you’ve just pasted complex Word-created HTML into the CMS*, and the initial results may look just fine. Since it’s the job of a good HTML editor to shield you from HTML code, TinyMCE hides the complex Word HTML and displays the content as best it can-deceptively cleanly, most often. When you paste directly from Word into a TinyMCE editor that has not been configured to anticipate this action, the Word content is-unbeknownst to the casual user-wrapped in a complex set of HTML containing XML code, CSS class references and style attributes. If a Drupal page is misformatting, one of the first things to determine is if the contents have been improperly pasted in from Word. Symptoms of Non-Cleaned-Up Content from Word The “Paste as Plain Text” feature, like Windows Notepad or Mac TextEdit, will strip out all formatting that accompanies content from a Word document or web page. In TinyMCE 3.4.9, the “Paste from Word” feature will preserve basic Word document formatting while removing special Word-specific code that transparently accompanies a paste from Word which typically messes up the display of a web page. TinyMCE provides two tools to facilitate cut & paste of text from a Microsoft Word document or from an existing web page into a new web page being created with the Drupal content management system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |