Extensions/Authoring/requiredTags

Extensions add specific functionality to Learnosity APIs. They rely on modules within LT being available.

--

Validates that all required tags are present before publishing an item.

Methods

run(optionsopt)

Listen for the user applying changes to (or saving) item settings. If they attempt to publish an item, validate that certain tags have been applied.

Parameters:
NameTypeAttributesDescription
optionsobject<optional>

Options to override the default settings.

{
     heading: 'Required tag{s} missing',
     headingLevel: 3,
     messageStart: 'Please add the following tag{s} before publishing:',
     messageEnd: '',
     requiredTags: [],
 }
Since
3.0.0
Example
import { LT } from '@caspingus/lt/authoring';

LT.init(authorApp); // Set up LT with the Author API application instance variable
LT.extensions.requiredTags.run();