We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    It should be a non-issue, you should be able to convince your users that they need to work directly with the WYSIWYG editors (which are not as good as one would hope already), or else there should be a way to auto-clean up the garbage code users end up adding to your content (would seem HTML purifier can’t deal with Word’s garbage) when they lazily copy-paste from Word you get messed up pages and astounded clients wondering how the hell their website got disfigured  rolleyes

    I never encountered a real big problem until I had over 200 users adding content with FDM, a significant proportion of them happily copy pasting content from Word adding a ton of garbage HTML which made me wish I had allowed raw text only !

    I have done a bit of research but nothing aside of http://www.textism.com/wordcleaner/ gave any great result.
    Of course, that’s hosted and I don’t think Dean plans to release this as a stand alone module sad

    How do you handle this kind of thing ?
    Do you have any solution aside from manual fixing which is a real pain ?

    Thanks !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you use TinyMCE or FCKEditor, there is a Paste from Word button that actually does a pretty good job of cleaning out all the trash.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        We have directed our content editors to Copy and Paste from Word into DreamWeaver, then to take DreamWeaver’s HTML and paste into the HTML window of TinyMCE. I know, I know...not an ideal solution... In our environment, Word documents must be maintained as the ultimate source. We found that the extra DreamWeaver step handled our HTML conversion from Word quite nicely in comparison to the other methods we tested. (IMO, there are pros and cons to each method). Basically, copy and paste from the Word document (Do Not Save as HTML/Webpage), then Paste into "Design View" in DreamWeaver. Toggle to "Code View" to copy the HTML, then Paste into "TincyMCE -> HTML window" (click the small "HTML" button), press OK, then Save!
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 4310
          • 2,310 Posts
          As Susan says TinyMCE does a pretty good job, for normally formatted text in a Word document .
          If there are embedded images you end up with a lot of white space.
            • 6726
            • 7,075 Posts
            Thanks for the feedback smiley

            I should have thought about that when I built the form with FDM, and go from "simple" to "custom" theme with the button to copy from Word rolleyes Dumb me... I actually never tested the feature, as I always use no editor myself...

            I’ll check this out and make the adjustments...
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 22770
              • 285 Posts
              The ’paste from word’ does a reasonable job, but it still leaves some junk. Maybe not harmful junk, but not ideal either.

              My solution: shout at whoever is doing it! grin

              Also, I’ve written several different guides for them on converting, all of which they ignore.

              I’ve been thinking for ages about writing a little script to strip out the most common MS junk from any input. I’ve done it before for a CMS I wrote myself (long since consigned to the trash can), and I think this would be the way to go.
                • 3749
                • 24,544 Posts
                Quote from: PatrickSamphire at Jul 30, 2008, 07:19 AM

                The ’paste from word’ does a reasonable job, but it still leaves some junk. Maybe not harmful junk, but not ideal either.

                My solution: shout at whoever is doing it! grin

                Also, I’ve written several different guides for them on converting, all of which they ignore.

                I’ve been thinking for ages about writing a little script to strip out the most common MS junk from any input. I’ve done it before for a CMS I wrote myself (long since consigned to the trash can), and I think this would be the way to go.

                I used to have an add-in for Word that saved fairly clean html. Sadly, I’ve lost it and can’t remember what it was called but. You might be able to find it, though.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 7253
                  • 97 Posts
                  I generally tell everyone to use the paste as plain text button on TinyMCE (3.0.1) and then apply formatting in the editor, using Paragraph, Heading 1, Heading 2... etc..

                  This has the advantage of getting people most of the way there with just copy/paste and producing clean, valid code every time. Provided people actually do it. I generally don’t demo or explain any other options during training.

                  I’ve found that the latest 3.x versions of TinyMCE (http://modxcms.com/TinyMCE-498.html) are quite a bit better at producing valid code from tag soup than they used to be.

                  There are lots of alternatives - this (http://lifehacker.com/software/web-publishing/clean-html-from-word-documents-133360.php) has a reasonable run down, both in the article an (especially) in the comments. It also links to the Office HTML filter which was mentioned earlier in this thread - this is the Microsoft add-on for Word which allows you to ’Copy as plain HTML’ from Word.
                    • 3749
                    • 24,544 Posts
                    This looks like it’s worth trying:

                    http://www.yawcpro.com/
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 34017
                      • 898 Posts
                      I’ve been using textile for all my sites lately. WYSIWYGs just mess things up. Now if I could just get Tiny to output as textile, I’d be golden.
                        Chuck the Trukk
                        ProWebscape.com :: Nashville-WebDesign.com
                        - - - - - - - -
                        What are TV's? Here's some info below.
                        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008