JavaScriptAPI : Constants

The following globally-available constants are used to customize the formatting preferences for your CETextSnippets and CETextRecipes:

  • CETextOptionsDefault: Espresso will use its default formatting (if any)
  • CETextOptionVerbatim: same as 0; text will not be automatically formatted at all by Espresso
  • CETextOptionNormalizeIndentationLevel: Espresso will add or remove indentation as necessary to visually align the inserted text as it was before, but at the indentation level of the text it is inserted into
  • CETextOptionNormalizeLineEndingCharacters: Convert newline character to the default/user settings
  • CETextOptionNormalizeIndentationCharacters: Convert indentation characters to the default/user settings

You can combine multiple options using bitwise operators. For instance, to insert a text snippet that converts newline and indentation characters, but leaves the indentation level alone you would do this:

var snippet = new CETextSnippet(
CETextOptionNormalizeLineEndingCharacters CETextOptionNormalizeIndentationCharacters