diff options
| author | bobzel <zzzman@gmail.com> | 2024-03-08 16:17:02 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-03-08 16:17:02 -0500 |
| commit | 7164179264d057986bfd5f303c61248f1c189406 (patch) | |
| tree | 430922a58162dcf44f48dd8031e07ebebfb943bf /src/client/documents/Documents.ts | |
| parent | b938ac2909290bd5dd11eeb0a0056f4679dbb25e (diff) | |
cleaned up MakeTemplate api and currentUserUtils templates for clicks etc.
Diffstat (limited to 'src/client/documents/Documents.ts')
| -rw-r--r-- | src/client/documents/Documents.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index b7d8222b9..e6969d1f3 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -1024,6 +1024,15 @@ export namespace Docs { return InstanceFromProto(Prototypes.get(DocumentType.PRES), new List<Doc>(), options); } + /** + * Creates a Doc to edit a script and write the compiled script into the specified field. + * Typically, this would be used to create a template that can then be applied to some other Doc + * in order to customize a behavior, such as onClick. + * @param script + * @param options + * @param fieldKey the field that the compiled script is written into. + * @returns the Scripting Doc + */ export function ScriptingDocument(script: Opt<ScriptField> | null, options: DocumentOptions = {}, fieldKey?: string) { return InstanceFromProto(Prototypes.get(DocumentType.SCRIPTING), script ? script : undefined, { ...options, layout: fieldKey ? ScriptingBox.LayoutString(fieldKey) : undefined }); } |
