Copy to Clipboard - but what I want to copy is some Javascript itself

Having found a solution to simply copying to clipboard here:

I’m hitting an additional problem.

What I am wanting to copy to the clipboard is some javascript itself.

If I place the “raw” javascipt between the " " in the above solution, then when I click my button to run the workflow within the app, I’m met with the following error:

Which seems to me like it’s actually trying to run the javascript that is in the “dynamic text” portion.

I have tried to input the Javascript as Arbitrary Text instead, which avoids the above problem BUT… when I paste the code its all as a single line rather than the “proper” format the javascript is presented in, and thus when pasted into its end target does not run, whereas if I copy/paste the javascript manually in the proper formatting, it runs fine.

So wondering if anyone can think of a clever way for me to be able to copy the snippet of Javascript in the proper formatting, without it actually attempting to run it?


1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.