I’m outputting some formatted text to a rich text format box. Then I have a button using the “copy to clipboard” function in the workflow. This copies it as markdown. How would I go about making it copy rich text? Right now, I’m asking the user to copy and paste by selecting the text which works but not ideal in my case.
There’s probably a way to “translate” that in a way that simply formats the text properly when the person pastes it but I’m not sure what that way would be…
Let me call the tech team to the rescue and get back to you on that one!
I’m also looking to achieve this. I need to show the rich text but i also need to save it in plain text. i’m resorting to a long list of replace() right now.
I’m not sure if this helps, but here’s how I convert the html rich text to plain text, and it works perfectly for me. The only downside it if you have stuff thats bolded, it pasted as not bolded etc. But most copy to clipboard buttons act like that anyways.
In the workflow use the native “Copy to Clipboard” action.
Then in the field put the variable that holds the rich text followed by: .replace(/<[^>]*>/g, ‘’)