Tags:
create new tag
view all tags

Question

This problem is related to copying and pasting MSWORD formatted paragraphs to WysiwygPlugin.

I know ideally we should compose within WYSIWGYG not importing from MSWORD. But I have large amount of MSWORD formatted documents.

Now the problem is that after pasting to WYSIWYG, the formatted paragraphs look good WITHIN the WYSIWYG editing screen even after saving and retrieving it a few times. But after exiting the editing screen. Some formatted are expanded such as these:

<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:country-region w:st="on">China</st1:country-region>

I was guessing that it is related to what is written on http://koala.ilog.fr/wiki/bin/view/TWiki/WysiwygPlugin#Editor_control:

"The default rendering that TWiki uses to generate HTML for browsers is 'lossy' - information in the TWiki syntax is lost in the HTML output, and a round-trip (recovering the original TWiki syntax from the HTML) is impossible. To solve this problem the plugin instead uses its own translation of TWiki syntax to pure XHTML. The generated XHTML is annotated with CSS classes that support the accurate recovery of the original TWiki syntax."

So I guess my question now is how to remove those CSS annotation automatically. Any comments are greatly appreciated

Environment

TWiki version: TWikiRelease04x00x01
TWiki plugins: WysiwygPlugin DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server: Apache
Perl version: 5.6.1
Client OS: MS Windows XP
Web Browser: IE, firefox
Categories: Plugins

-- StevenMarshall - 27 Dec 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

This is not so much to do with TWiki, it's MSWORD that is stuffing the text with junk.

Kupu supports plugin filters to assist with removing this sort of junk. Your best bet is to find - or write - such a filter for Kupu. Alternatively you could extend the WysiwygPlugin to filter it, though I suspect the Kupu approach would be better.

-- CrawfordCurrie - 04 Jan 2007

Alternatively, you could try using the MsWordToTWikiMLAddOn Word macro to convert your Word docs to TWiki markup. Generally gives decent results.

-- JosMaccabiani - 04 Jan 2007

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-01-04 - JosMaccabiani
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.