I have some drafts containing HTML tags from previous processing. I’d like to keep these tags, but would also like to send the draft to e.g. a translation service. How can I strip these tags not from the draft, but from what is sent by another action?
Well, the script itself is just a single line that you could reuse. If you used the script below, in a script action step, it would create a [[stripped]] template tag, which you could then use in the subsequent steps in your action:
let stripped = draft.content.replace(/<\/?[^>]+(>|$)/g, "")
draft.setTemplateTag("stripped", stripped)