After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143084 - cut/paste text/html
cut/paste text/html
Status: RESOLVED DUPLICATE of bug 34632
Product: Gnumeric
Classification: Applications
Component: import/export HTML
git master
Other All
: Low enhancement
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
: 308387 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-05-24 17:46 UTC by David A Knight
Modified: 2010-06-25 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David A Knight 2004-05-24 17:46:59 UTC
pasting from gnumeric into another app as text/html shouldn't paste a complete
html document, it should just paste the table markup.
Comment 1 Jon Kåre Hellan 2004-07-29 11:59:19 UTC
It is not clear that this is a bad thing, and also not clear what else to do.
OpenOffice, Gnumeric and Abiword all wrap the table inside an html document.
Mozilla is the only application I know about which does not.
Comment 2 David A Knight 2004-07-29 15:56:42 UTC
If I'm working on an html document, and want to insert some data from a
spreadsheet, I may just think "great I can just cut/paste from gnumeric".

Then you end up with a complete document getting pasted into the one you are
working on, which just seems very odd behaviour.  Likewise for pasting some text
from a word document.
Comment 3 Jon Kåre Hellan 2004-08-19 11:19:36 UTC
I see where you're coming from. It's certainly a valid usecase. As a workaround,
you could in fact save as html fragment, and insert the file into your editor
buffer.

The consumer of the clipboard could be either a progam or a human. We do not know
how smart the program is going to be. If the program expects content marked
text/html to be - well - text/html, that seems reasonable to me. But many
programs do in fact try to make sense of programs. Gnumeric is one of these.

Unfortunately, the meaning of text/html on the clipboard is not well specified.
There has been some discussion, see e.g. the thread starting at

http://freedesktop.org/pipermail/xdg/2003-December/003077.html

but no specifications yet, not even a draft. Do you want to write one?

Personally, I think markup fragments on the clipboard make sense. But I don't
think it is correct to call them text/html.

Until there is a standard to implement, this is probably a NOTABUG. But that's
the maintainer's call.

And feel free to restart the discussion at xdg@freedesktop.org.
Comment 4 Jody Goldberg 2004-08-28 21:01:51 UTC
NOTABUG seems like a reasonable call here, but lacking an explicit standard I'll
leave this open as a placeholder.
Comment 5 Andreas J. Guelzow 2004-10-15 22:58:06 UTC
Is there really any use case where we would want to paste a full html document
from gnumeric?
Comment 6 Morten Welinder 2004-10-17 14:05:03 UTC
Pasting to a browser perhaps.
Comment 7 Dominic Lachowicz 2004-12-05 02:05:48 UTC
fyi - abiword expects a full HTML document. i'd agree with Jon that this is
NOTABUG until there's some sort of reasonable standard to conform to.
Comment 8 Jon Kåre Hellan 2006-10-18 11:26:54 UTC
Microsoft has specified how they do HTML on the Windows clipboard. See http://msdn.microsoft.com/workshop/networking/clipboard/htmlclipboard.asp

It's a full HTML document preceded by some headers. The fragment the user chose
is indicated by a header before the document and comments inside it. E.g.:

Version:0.9
StartHTML:71
EndHTML:170
StartFragment:140
EndFragment:160
StartSelection:140
EndSelection:160
<!DOCTYPE>
<HTML>
<HEAD>
<TITLE>The HTML Clipboard</TITLE>
<BASE HREF="http://sample/specs"> 
</HEAD>
<BODY>
<!--StartFragment -->
<P>The Fragment</P>
<!--EndFragment -->
</BODY>
</HTML>
Comment 9 Morten Welinder 2009-05-16 03:06:47 UTC
*** Bug 308387 has been marked as a duplicate of this bug. ***
Comment 10 Andreas J. Guelzow 2010-05-11 05:07:55 UTC
Note that the link of comment #8 is no longer valid.
Comment 11 Andreas J. Guelzow 2010-06-15 20:14:29 UTC
This should really be solved as part of bug #34632

*** This bug has been marked as a duplicate of bug 34632 ***
Comment 12 Morten Welinder 2010-06-25 13:00:01 UTC
HTML Clipboard Format:

http://msdn.microsoft.com/en-us/library/ms649015%28VS.85%29.aspx