• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4836: Pasting Open Office can lead to empty documents

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TinyMCEPlugin Normal Closed   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


When copypasting from OpenOffice (Linux) to a TMCE text area, it depends on sheer luck whether the topic will survive. I could reduce it to the difference whether the OO stuff gets pasted within a <p> element or not, and the reason being that OO creates a bunch of <META> elements before the contents. To reproduce you'll need to paste the following stuff into TMCE's HTML editor, I found no better way of visualisation:

dead! Forget that I said that. I saved this topic and only then realized that I had the forbidden HTML comment included. Rats.

Starting over: You need to snatch the HTML comment saying "WYSIWYG content" from somewhere and add it. I can't here, because the TMCE plugin will then wreak havoc on the topic. Another way to reproduce is to start with a completely empty topic and then paste OO stuff in.

The following is OK:

<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<p>Topic content</p>

The following results in an empty topic:

<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<p>Topic content</p>

I guess that Firefox kills the element containing the offending META, but auto-generates a closing </p> if the META comes after an opening <p>.

Setting to "normal" for the moment, should be raised if it affects other scenarios, too.

Hasn't this one haunted Kupu, too?

-- TWiki:Main/HaraldJoerg - 16 Oct 2007

Addendum: Copypaste from MS Windows / MS Word to both Firefox/TMCE and IE6/TMCE works fine, even if I replace the whole document. For complex MS Word layouts the result contains a lot of HTML, but as long as you stick to TMCE, you wouldn't notice.

-- TWiki:Main/HaraldJoerg - 17 Oct 2007

I'm not terribly sure what steps to follow to reproduce this problem. Can you give me a step-by-step please?


The easiest way may be the following:

  1. Create a document (just a heading and one line will do) in OpenOffice. I'll attach a sample as https://develop.twiki.org/pub/Bugs/Item4836/TMCEdemo.odt (download, don't just click. develop.twiki.org serves as text/plain).
  2. Create an empty topic (not even containing a signature), which per default will lauch TMCE
    • In HTML view, the topic should only contain the indicator comment (which apparently is visible in Firefox on Linux, but not in IE on Windows?!?)
  3. In OpenOffice, hit [CTRL]-A (select all) and [CTRL]-C (copy to clipboard)
  4. Set focus on TMCE's text area, hit [CTRL]-V (paste)
  5. Save
  6. The topic is contains no text.
    • If you go "back" in your browser, it is still there. If you "Edit" again, it is lost.

I could reproduce this at OpenOfficeCopyPaste. And by the way, the first attach took more than four minutes to complete, while the second was instantaneous. I seem to recall that others made the same observation, too, but would think it is a server and not a code issue.

-- TWiki:Main.HaraldJoerg - 18 Oct 2007

Thanks, I was able to reproduce that.

The problem is that HTML::Parser doesn't recognise META as a self-closing tag. That means <META is interpreted as opening a <META>..</META> block, which doesn't get closed until the end of the topic text. Since the translator then goes on to ignore META blocks, the content is lost.

The solution is to make the HTML::Parser recognise META, i guess.


Should be better now


Now it works with exactly the same setup (Firefox, OpenOffice, Ubuntu) where it failed before. Better, indeed smile

-- TWiki:Main.HaraldJoerg - 12 Nov 2007

Summary Pasting Open Office can lead to empty documents
ReportedBy TWiki:Main.HaraldJoerg

SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Extension
Component TinyMCEPlugin
Priority Normal
CurrentState Closed

Checkins TWikirev:15549 TWikirev:15550
TargetRelease n/a

Topic attachments
I Attachment History Action Size Date Who Comment
HTMLhtml TMCEdemo.html r1 manage 0.9 K 2007-10-18 - 16:42 HaraldJoerg TMCE's html view of a page which can't be saved
Unknown file formatodt TMCEdemo.odt r1 manage 6.7 K 2007-10-18 - 16:39 HaraldJoerg A heading and one line in OpenOffice
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2007-11-12 - HaraldJoerg
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback