What to set the clipboardData to for exchanging styled text with a 3rd party app

Bob Sneidar bobsneidar at iotecdigital.com
Mon Nov 13 14:32:07 EST 2023


Couldn’t you choose door number 2? Using just the clipBoardData without a parameter is something I never do anymore. 

Bob S


> On Nov 13, 2023, at 11:24 AM, Craig Newman via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi.
> 
> I always use the “htmlText”.
> 
> Of course this encodes the original text with HTML tags, so you cannot just:
> 
> set the clipBoardData to the htmlText of fld 1
> set the text of fld 2 to the clipBoardData
> 
> you have to:  set the htmltext of fld 2 to the clipBoardData
> 
> 
> 
> Craig
> 
> 
>> On Nov 13, 2023, at 12:18 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Hivemind,
>> 
>> Recommendation as to what is best to set the clipboardData property to, when you want to copy styled text from a field to the clipboard for exchange with a 3rd party (any 3rd party) application that supports some form of styled text, that can include text in multiple languages (i.e. Unicode)?
>> 
>> Examples:
>> 1) set the clipboardData["rtf"] to the rtfText of fld "X"
>> 2) set the clipboardData["html"] to the htmlText of fld "X"
>> 3) set the clipboardData["text"] to the text of fld "X" -- since the text in field since LC7 is unicode
>> 4) set the clipboardData["unicode"] to the textEncode(fld "X","UTF-16")
>> 
>> Something else? Should fullClipboardData or rawClipboardData be used instead? Looking for best practice recommendation.
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list