You are here: Foswiki>Tasks Web>Item944 (13 Nov 2008, CrawfordCurrie)Edit Attach
Pasting from Microsoft word interjects a lot of </div>\n;<div /> (marking new line) and empty lines \n (meaning nothing) into the HTML, together these produce HTML that is broken by line breaks over many lines. This foils TWiki's assumption that HTML will be contained on one line.

I'll try to write more when I get time but it seems a conceptually simple task to clean up word HTML a little.


Indeed. Kupu supports the definition of filters that can be used to process pasted HTML. You could add one quite easily, I think.

I don't own a copy of MS Word, so I won't be doing it.

CC

Undeferred, post Dakar CC


If you want to have a go at it, I include a quick n dirty patch I made to at least filter out the windows-only chars put by word pastes, and (some of) gratuitous font typeface settings: see attached convert-office-special-chars.patch

This patches the perl of the plugin, Crawford solution (paste filter) should be the proper one.

CN

See also Item1041, Item1890

CC

This patch no longer works to get rid of font tags, as of 10 May 06. I think the implementation now wraps them in spans as Crawford wanted to ensure that a user could specify a font.

However, I'd be interested in any updates for this.

MC

This relates to the KupuContrib, not WysiwygPlugin, so changing attribution.

CC

I am no longer supporting the KupuContrib. Please use the TinyMCEPlugin instead.

-- CrawfordCurrie - 05 Aug 2008

Kupu has been dropped from NextWiki.

-- CrawfordCurrie - 13 Nov 2008 - 08:39

ItemTemplate edit

Summary Wysiwyg could paste much better
ReportedBy MartinCleaver
Codebase
SVN Range
AppliesTo Extension
Component KupuContrib
Priority Enhancement
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
I Attachment Action Size Date Who Comment
convert-office-special-chars.patchpatch convert-office-special-chars.patch manage 697 bytes 21 Feb 2006 - 13:57 ColasNahaboo patch to HTML2TML.pm for special chars
Topic revision: r11 - 13 Nov 2008, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy