Re: Mozilla selections question
Christopher Blizzard <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.gtk |
|---|---|
| Message-ID | <[email protected]> |
Philip wrote: > I have noticed that some applications like OpenOffice.org manage it to get > the HTML-data behind a selection that originates from Mozilla. So when I > select some marked up tekst in Mozilla, copy and then paste in > OpenOffice.org then OpenOffice.org will also paste some HTML-tags. It > (OpenOffice.org) does not yet give the text the correct formatting (like > Ms Office vs. Internet Explorer does) but I assume that in near future > this will too, be possible using an OpenOffice.org vs Mozilla combination? Depends on whether or not OpenOffice.org wants to try to interpret the information, I guess. > > > However, we want to give the user the same feature in our > clipboard-manager.. so to retrive the HTML-text of a selection in Mozilla. > So my question, how do I do this? Is it just by changing the Atom from for > example CLIPBOARD or PRIMARY to a Mozilla-defined Atom and if so which > one? Or is it a more complex way? Is there documentation about this > subject? Or should I start exploring the sources of OpenOffice.org and > Mozilla :-\ ? I have already started searching in the sources of Mozilla > and found files like nsClipboard.cpp.. > Well, the target selection is already included in the information that you get from the clipboard interfaces, so that shouldn't be an issue. More importantly is that the gtk 1.2 version of Mozilla uses UCS2 for the string formats, even though it doesn't advertise that as the encoding for the string. (Lame, yes, I know.) This is fixed in the Gtk2 version, but that has yet to make it to production quality code. --Chris