
it is a custom format used by the RICHEDIT common control, and registered via RegisterClipboardFormat as already mentioned. For your example about web pages, you can use Chrome and the developer tools : CMD + Option + c to inspect the part you want to copy, and then in Elements explorer, right click on the node you want and choose Copy as HTML. When the system asks a clipboard owner to render clipboard data, it sends the WMRENDERFORMAT message and waits up to 30 seconds for it to return.

From Context menu Select option Inspect Element then press Ctrl + c to copy the link along with HTML formatting. It can represent basic tables, but that’s not its bread and butter. For Chrome: Easiest way is to Right Click on the hyperlink. but the "CF_RTF" or "CF_RICHTEXT" is not one of them. As its name suggests, Rich Text Format is designed for text. Note: There are already a few reserved system clipboard formats such as CF_TEXT (=1), CF_BITMAP(=2) etc. uses RichEdit ĬF_RICHTEXT := RegisterClipboardFormat(RichEdit.CF_RTF) Īnd: if Clipboard.HasFormat(CF_RICHTEXT) then. So it might be a better idea to use other naming for the returned value of RegisterClipboardFormat. Use a Rich Edit Clipboard Operation As with an edit control, you can copy or cut the contents of the current selection by using the WMCOPY or WMCUT message. The constant CF_RTF is already declared in RichEdit unit as: CF_RTF = 'Rich Text Format' ĬF_RTFNOOBJS = 'Rich Text Format Without Objects' ĬF_RETEXTOBJ = 'RichEdit Text and Objects'
#Rich text clipboard for windows how to#
Įdit: After reading the documentation: How to Use Rich Edit Clipboard Operations Then check for: if Clipboard.HasFormat(CF_RTF) then.
#Rich text clipboard for windows code#
The rtf clipboard data created by the style text widget cant be used if the code is folded. varĬF_RTF := RegisterClipboardFormat('Rich Text Format') It has to do with the new folding capabilities. Using the same registered clipboard format.

This enables more than one application to copy and paste data If a registered format with the specified name already exists, a newįormat is not registered and the return value identifies the existingįormat. The returned value is generated by the system and may vary. No, You need to register the RTF clipboard format via RegisterClipboardFormat function.

Can I generally use Clipboard.HasFormat($C078) to detect any
