Hello, guys. I am wondering how can I craete a component that has a button to copy its text content to the user's clipboard.
I would like to be able to copy the rich text's content only.
a!columnLayout( contents: { a!richTextDisplayField( label: "Lorem Ipsum", labelPosition: "ABOVE", value: { "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt." }, marginBelow: "NONE" ), a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Copy to clipboard", submit: false, width: "MINIMIZE", style: "LINK" ) }, align: "CENTER", marginAbove: "NONE", marginBelow: "NONE" ) } )
If there's any coding answer for its implementation, I would much appreciate it.
Discussion posts and replies are publicly visible
a!richTextDisplayField( labelPosition: "COLLAPSED", value: { a!richTextItem( text: ri!textToCopy, style: "STRONG", size: "MEDIUM" ), char(9), a!richTextIcon( icon: "clone-solid", size: "MEDIUM", link: 'type!{http://www.appian.com/ae/types/2009}CopyToClipboardLink'( textToCopy: ri!textToCopy ), linkStyle: "STANDALONE" ) } )
By the way, a team-mate found this, hope it's useful for you all.Source: community.appian.com/.../134831
I'll add my standard disclaimer here - this is not a documented capability and is not officially supported. Any function or type like has not gone through the rigor / testing that supported functionality has and is subject to change in any release without notice.