Hi, me wrote: > > actually, the selected HTML code might be available from the clipboard. > E.g., both Firefox and Internet Explorer put it there in multiple > formats. The following are lists of the available formats after copying > from FF and IE, respectively: > > 49161: DataObject > 49422: text/html > 49366: HTML Format > 49776: text/_moz_htmlcontext > 49778: text/_moz_htmlinfo > 13: CF_UNICODETEXT > 1: CF_TEXT > 49171: Ole Private Data > 16: CF_LOCALE > 7: CF_OEMTEXT > > 49161: DataObject > 1: CF_TEXT > 13: CF_UNICODETEXT > 49366: HTML Format > 49330: Rich Text Format > 49171: Ole Private Data > 16: CF_LOCALE > 7: CF_OEMTEXT > > The formats starting with CF_ are pre-defined clipboard formats, the > remaining ones are registered through Windows' RegisterClipboardFormat() > function. I don't know how widely understood they are, but at least > Microsoft Word is able to render headlines and other HTML-formatting > instructions when text copied from Firefox is pasted into a document. > It seems, the clipboard object associated with "HTML Format" contains > enough information for correct rendering. > > A different point is how to access the HTML content in VIM. I doubt it > would be a good idea to always paste the HTML source when accessing the > clipboard through the + or * register. Probably a "pasteclipboard()" > function which takes an argument for determining the preferred format > would be a better way. This function function could then be used inside > a mapping whenever a VIM user wants to paste the original HTML source.
sorry, I forgot to mention explicitly that this is totally Microsoft Windows-centric. But I think other OSs might also support multiple formats on the clipboard. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)