Can someone assist me in my JS? I’m trying to accomplish the following:
- Create new draft in editor view
- Apply JS syntax to #1
- Add ‘script’ tag to #1
I’m able to do all of these in JS, but not all in one action. The issue is when I use the
editor object followed by the
draft object, the
draft functions apply to the current draft open (prior to running the action) even though I use
I thought it may be an issue where the action is writing the editor changes to disk before the draft is loaded in the editor view, but I get errors when using JS timeout methods and can’t figure this one out.
My code is below, appreciate the help!