RTF clipboard lazarus / 32-Linux ---------------------------------------------------------------------- Martin V · 2012-06-24 13:13 I have got an RTF data string and want to copy it into the clipboard. The user should have the possibility to insert formatted text into his wordprocessing app like Open Office. In Windows, this code works fine: Code: [Select]const cf_rtf : longword = 0; if cf_rtf = 0 then   cf_rtf := Clipbrd.RegisterClipboardFormat ('Rich Text Format'); {or put it to the initialization block of unit} Clipbrd.AddFormat (cf_rtf, P^, len); The code has no effect in Linux. Does the RTF format have another name in Linux or does the RTF Clipboard not exist or do I have to use another code? ---------------------------------------------------------------------- Martin V · 2012-06-25 14:36 Meanwhile, I found the solution which is quite easy: A small sample program with a listbox shows you the currently supported clipboard formats after inserting a sample text from your wordprocessing app: Clipboard.SupportedFormats (Listbox1.Items); The correct string for "RegisterClipboardFormat" is "text/richtext". ---------------------------------------------------------------------- Martin V · 2012-07-04 20:23 The code for the three OS Windows, Linux and MacOS is the following: Code: [Select]    {$ifdef windows}     const ClipboardFormat_RTF = 'Rich Text Format';     {$endif}     {$ifdef Linux}     const ClipboardFormat_RTF = 'text/richtext';     {$endif}     {$ifdef darwin}     const ClipboardFormat_RTF = 'text/rtf';     {$endif}