Converting a Javascript Draft to a template


#1

Hi all,

I’m trying to set up a template for meetings. I’ve written a draft in Javascript, but I’m not sure what the next step is to convert it to a template that I can choose when creating a new draft at a later date.

I’m sure this is simple, but I’ve tried looking through the documentation, but can’t seem to find that simple step. Any help would be appreciated.

Thanks.


#2

This example action might be helpful. It demonstrates a scripted action that creates a new draft using a template, and pre-assigned tags.


#3

Great, that’s just what I need.

I can see how to get to the script to tweak it to my needs as well.

Thanks


#4

I notice that editor.focus() (used in that action), doesn’t feature in the API documentation of the Editor object.

Is it a synonym of one of the listed methods, or something a bit different ?


#5

Perhaps another gap in the Editor API page is editor.find() ?


#6

Updated the action to use editor.activate(). focus and find are both still supported but were deprecated during the beta cycle.


#7

Got it – thanks.

And the preferred alternative to .find() now ?


#8

I’ve been keeping my templates in a separate workspace and then use an action to duplicate the draft. Just an alternative to doing templates with Javascript.