Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Function [other Function type actions]
Document [operators of similar scope]
Document configuration [other Document configuration operators]
success boolean
v9.6.0
Baseline
10.1.2
require(featureName)
The require() operator adds the /Hints container and its subsidiary containers. It is equivalent to selecting Built In Hints from the File menu. If any of the containers already exists, that container is left unchanged. For example:
require("Hints");
featureName is a mandatory argument. It is a literal string and case-sensitive.
"Hints" is currently the only featureName value recognised by require(). But, this method allows for other values to be added in the future as need arises.
From v10.1.2, require() accepts four new case-sensitive arguments:
- require("Templates") adds the built-in configuration
/Templates
container. It is equivalent to the container created when first adding a built-in template from the File menu. - require("Prototypes") adds the /Prototypes container. It is equivalent to the container created when first adding a built-in prototype from the File menu.
- require("Preview") displays the text pane sub-tab selector above the text pane (the new document default is to hide the selector).
- require("NoPreview") hides the text pane selector, i.e. the reverse of the above and the default for a new TBX document.