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
--
StevenMarshall - 27 Dec 2006
Answer
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