MacRabbit

CETextSnippet

JavaScriptAPI : CETextSnippet

CETextSnippet objects allow you to compile snippets from strings using SnippetSyntax into snippets that can be inserted via the TextActionContext object.

CETextSnippet(snippet)

The CETextSnippet constructor accepts a snippet as a string argument:

var snippet = new CETextSnippet('<${1:p}>$0</$1>');
context.insertTextSnippet(snippet);