NextGen Knowledge Center

Edit Code Template Panel

When any code template is selected in the above, the Edit Code Template panel is shown below. This allows you to change which library it belongs to, the type of template, which contexts to include the code in, and the actual code.

ItemNameDescription
ALibraryThe library that the current code template belongs to.
BTypeThe type of code template to create.
  • Function: The template will be compiled in with scripts, and the drag-and-drop will include the function signature.
  • Drag-and-Drop Code Block: The template will not be compiled in with scripts, and the drag-and-drop will include the entire code block verbatim (except for the initial documentation block). Use this option for snippets of boilerplate code you can drag into JavaScript scripts.
  • Compiled Code Block: The template will be compiled in with scripts, but drag-and-drop will not be available at all. Use this to declare initial variables or anything else you want to have executed at the beginning of your scripts.
CCodeThe actual code to use. At the top of the code you may optionally provide a JSDoc comment block explaining the purpose and function of the template. This comment will be shown as the description for the template.
DContextSelect which scripts should have access to this code template. Limiting contexts to only those scripts where a code template is actually needed can help optimize memory usage. For additional information, see Code Template Contexts.
EUpdate JSDocGenerates / updates a JSDoc at the beginning of your code, with parameter / return annotations as needed. For additional information, see Use JSDoc in Code Templates.